Class: Fort::Type::Character
Constant Summary
Constants included from Providable
Instance Attribute Summary collapse
-
#len ⇒ Object
readonly
Returns the value of attribute len.
Attributes inherited from Base
Instance Method Summary collapse
- #declare ⇒ Object
-
#initialize(id, params) ⇒ Character
constructor
A new instance of Character.
- #to_s ⇒ Object
Methods inherited from Base
Methods included from Providable
Constructor Details
#initialize(id, params) ⇒ Character
Returns a new instance of Character.
119 120 121 122 |
# File 'lib/fort/type.rb', line 119 def initialize(id, params) super @len = params.fetch(:len) end |
Instance Attribute Details
#len ⇒ Object (readonly)
Returns the value of attribute len.
123 124 125 |
# File 'lib/fort/type.rb', line 123 def len @len end |
Instance Method Details
#declare ⇒ Object
129 130 131 |
# File 'lib/fort/type.rb', line 129 def declare "#{@type}(len=#{@len})#{dimension()}" end |
#to_s ⇒ Object
125 126 127 |
# File 'lib/fort/type.rb', line 125 def to_s super + "Len#{len_str()}" end |