Class: Flowckerc::Atom

Inherits:
Object
  • Object
show all
Defined in:
lib/flowckerc/tokens.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ Atom

Returns a new instance of Atom.



55
56
57
58
59
# File 'lib/flowckerc/tokens.rb', line 55

def initialize element
  @id = UniqueID.next
  @element = element
  @config = {}
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



53
54
55
# File 'lib/flowckerc/tokens.rb', line 53

def config
  @config
end

#elementObject (readonly)

Returns the value of attribute element.



52
53
54
# File 'lib/flowckerc/tokens.rb', line 52

def element
  @element
end

#idObject (readonly)

Returns the value of attribute id.



51
52
53
# File 'lib/flowckerc/tokens.rb', line 51

def id
  @id
end

Instance Method Details

#toHashObject



61
62
63
64
65
66
67
# File 'lib/flowckerc/tokens.rb', line 61

def toHash
  {
      id: @id,
      element: @element,
      config: @config
  }
end