Class: Zodra::ScalarType
- Inherits:
-
Object
- Object
- Zodra::ScalarType
- Defined in:
- lib/zodra/scalar_type.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#coercer ⇒ Object
readonly
Returns the value of attribute coercer.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, base:, coercer:) ⇒ ScalarType
constructor
A new instance of ScalarType.
Constructor Details
#initialize(name:, base:, coercer:) ⇒ ScalarType
Returns a new instance of ScalarType.
7 8 9 10 11 |
# File 'lib/zodra/scalar_type.rb', line 7 def initialize(name:, base:, coercer:) @name = name.to_sym @base = base.to_sym @coercer = coercer end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
5 6 7 |
# File 'lib/zodra/scalar_type.rb', line 5 def base @base end |
#coercer ⇒ Object (readonly)
Returns the value of attribute coercer.
5 6 7 |
# File 'lib/zodra/scalar_type.rb', line 5 def coercer @coercer end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/zodra/scalar_type.rb', line 5 def name @name end |