Class: Lumb::StructureItem

Inherits:
Object
  • Object
show all
Defined in:
lib/lumb/structure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#slotObject (readonly)

Returns the value of attribute slot.



25
26
27
# File 'lib/lumb/structure.rb', line 25

def slot
  @slot
end

#typeObject (readonly)

Returns the value of attribute type.



25
26
27
# File 'lib/lumb/structure.rb', line 25

def type
  @type
end

#wsObject (readonly)

Returns the value of attribute ws.



25
26
27
# File 'lib/lumb/structure.rb', line 25

def ws
  @ws
end