Class: Lumb::StructureItem
- Inherits:
-
Object
- Object
- Lumb::StructureItem
- Defined in:
- lib/lumb/structure.rb
Instance Attribute Summary collapse
-
#slot ⇒ Object
readonly
Returns the value of attribute slot.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#ws ⇒ Object
readonly
Returns the value of attribute ws.
Instance Method Summary collapse
-
#initialize(slot, type, ws) ⇒ StructureItem
constructor
A new instance of StructureItem.
Constructor Details
#initialize(slot, type, ws) ⇒ StructureItem
Returns a new instance of StructureItem.
27 28 29 30 31 32 33 |
# File 'lib/lumb/structure.rb', line 27 def initialize(slot, type, ws) @slot, @type, @ws = slot.to_sym, type.to_sym, ws if not [:Num, :Sym, :Date].include? @type raise "unrecognized type #{@type}" end end |
Instance Attribute Details
#slot ⇒ Object (readonly)
Returns the value of attribute slot.
25 26 27 |
# File 'lib/lumb/structure.rb', line 25 def slot @slot end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
25 26 27 |
# File 'lib/lumb/structure.rb', line 25 def type @type end |
#ws ⇒ Object (readonly)
Returns the value of attribute ws.
25 26 27 |
# File 'lib/lumb/structure.rb', line 25 def ws @ws end |