Class: Odin::Types::DecimalPlacesConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/odin/types/schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(places:) ⇒ DecimalPlacesConstraint

Returns a new instance of DecimalPlacesConstraint.



60
61
62
63
64
# File 'lib/odin/types/schema.rb', line 60

def initialize(places:)
  @kind = :decimal_places
  @places = places
  freeze
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



58
59
60
# File 'lib/odin/types/schema.rb', line 58

def kind
  @kind
end

#placesObject (readonly)

Returns the value of attribute places.



58
59
60
# File 'lib/odin/types/schema.rb', line 58

def places
  @places
end