Ruby has Integer(...) and Float(...), but does it have Boolean(…) for things like:

Boolean(ENV[“SOME_FLAG”])

What's the Ruby idiom here?

@getajobmike !!ENV[“SOME_FLAG”]

@llimllib @getajobmike

001> ENV["FLAG"]
=> "false"
002> !!ENV["FLAG"]
=> true

@jandudulski @getajobmike Yup that’s how that works

@llimllib @getajobmike but it's not what you want to achieve :)

I use Dry::Types for this.

Dry.Types::Params::Bool[ENV["FLAG"]]