class ThreeScaleToolbox::Helper::BooleanTransformer
Public Instance Methods
call(param_str)
click to toggle source
# File lib/3scale_toolbox/helper.rb, line 73 def call(param_str) raise ArgumentError unless param_str.is_a?(String) return true if true?(param_str) return false if false?(param_str) raise ArgumentError end
false?(param_str)
click to toggle source
# File lib/3scale_toolbox/helper.rb, line 91 def false?(param_str) case param_str when 'false', '0' true else false end end
true?(param_str)
click to toggle source
# File lib/3scale_toolbox/helper.rb, line 82 def true?(param_str) case param_str when 'true', '1' true else false end end