Class: Zodra::ScalarType

Inherits:
Object
  • Object
show all
Defined in:
lib/zodra/scalar_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#baseObject (readonly)

Returns the value of attribute base.



5
6
7
# File 'lib/zodra/scalar_type.rb', line 5

def base
  @base
end

#coercerObject (readonly)

Returns the value of attribute coercer.



5
6
7
# File 'lib/zodra/scalar_type.rb', line 5

def coercer
  @coercer
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/zodra/scalar_type.rb', line 5

def name
  @name
end