Sha256: 79a6842d843c632e5246d75c69f91028e338e5baad5a15a4a29ccd46f68cdd9f

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

class Taro::Types::Scalar::BooleanType < Taro::Types::ScalarType
  self.openapi_type = :boolean

  def coerce_input
    if object == true || object == false
      object
    else
      input_error('must be true or false')
    end
  end

  def coerce_response
    if object == true || object == false
      object
    else
      response_error('must be true or false')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
taro-1.3.0 lib/taro/types/scalar/boolean_type.rb
taro-1.2.0 lib/taro/types/scalar/boolean_type.rb
taro-1.1.0 lib/taro/types/scalar/boolean_type.rb
taro-1.0.0 lib/taro/types/scalar/boolean_type.rb