class SoberSwag::Reporting::Input::Bool
Convert booleans.
Public Instance Methods
call(val)
click to toggle source
# File lib/sober_swag/reporting/input/bool.rb, line 7 def call(val) return Report::Value.new(['was not a bool']) unless [true, false].include?(val) val end
swagger_schema()
click to toggle source
# File lib/sober_swag/reporting/input/bool.rb, line 13 def swagger_schema [{ type: 'boolean' }, {}] end