Class: Ruleby::Core::Atom

Inherits:
Object
  • Object
show all
Defined in:
lib/core/atoms.rb

Direct Known Subclasses

FunctionAtom, PropertyAtom, ReferenceAtom

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tag, slot, template, block) ⇒ Atom

Returns a new instance of Atom.



19
20
21
22
23
24
# File 'lib/core/atoms.rb', line 19

def initialize(tag, slot, template, block)
  @tag = tag
  @slot = slot
  @template = template
  @proc = block
end

Instance Attribute Details

#procObject (readonly)

Returns the value of attribute proc.



17
18
19
# File 'lib/core/atoms.rb', line 17

def proc
  @proc
end

#slotObject (readonly)

Returns the value of attribute slot.



17
18
19
# File 'lib/core/atoms.rb', line 17

def slot
  @slot
end

#tagObject (readonly)

Returns the value of attribute tag.



17
18
19
# File 'lib/core/atoms.rb', line 17

def tag
  @tag
end

#templateObject (readonly)

Returns the value of attribute template.



17
18
19
# File 'lib/core/atoms.rb', line 17

def template
  @template
end

Instance Method Details

#to_sObject



26
27
28
# File 'lib/core/atoms.rb', line 26

def to_s
  "#{self.class},#{@tag},#{@slot},#{@template}"
end