Class: Fort::Type::Numeric
- Inherits:
-
Base
- Object
- Base
- Fort::Type::Numeric
show all
- Defined in:
- lib/fort/type.rb
Constant Summary
Constants included
from Providable
Providable::ID_GENERATOR
Instance Attribute Summary collapse
Attributes inherited from Base
#dim, #id, #type
Instance Method Summary
collapse
Methods inherited from Base
#dimension, #parenthesis
Methods included from Providable
#multi_provide, #provide
Constructor Details
#initialize(id, params = {}) ⇒ 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
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
|