Class: Fort::Type::Numeric
Constant Summary
Constants included from Providable
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Attributes inherited from Base
Instance Method Summary collapse
- #declare ⇒ Object
-
#initialize(id, params = {}) ⇒ Numeric
constructor
A new instance of Numeric.
- #to_s ⇒ Object
Methods inherited from Base
Methods included from Providable
Constructor Details
#initialize(id, params = {}) ⇒ Numeric
Returns a new instance of Numeric.
82 83 84 85 |
# File 'lib/fort/type.rb', line 82 def initialize(id, params = {}) super @kind = params.fetch(:kind) end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
86 87 88 |
# File 'lib/fort/type.rb', line 86 def kind @kind end |
Instance Method Details
#declare ⇒ Object
92 93 94 |
# File 'lib/fort/type.rb', line 92 def declare "#{@type}(kind=#{@kind})#{dimension()}" end |
#to_s ⇒ Object
88 89 90 |
# File 'lib/fort/type.rb', line 88 def to_s super + "Kind#{@kind}" end |