Class: Ruleby::Core::Atom
- Inherits:
-
Object
- Object
- Ruleby::Core::Atom
- Defined in:
- lib/core/atoms.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#deftemplate ⇒ Object
readonly
Returns the value of attribute deftemplate.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(tag, method, deftemplate, &block) ⇒ Atom
constructor
A new instance of Atom.
- #to_s ⇒ Object
Constructor Details
#initialize(tag, method, deftemplate, &block) ⇒ Atom
Returns a new instance of Atom.
19 20 21 22 23 24 |
# File 'lib/core/atoms.rb', line 19 def initialize(tag, method, deftemplate, &block) @tag = tag @method = method @deftemplate = deftemplate @proc = Proc.new(&block) if block_given? end |
Instance Attribute Details
#deftemplate ⇒ Object (readonly)
Returns the value of attribute deftemplate.
17 18 19 |
# File 'lib/core/atoms.rb', line 17 def deftemplate @deftemplate end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
17 18 19 |
# File 'lib/core/atoms.rb', line 17 def method @method end |
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
17 18 19 |
# File 'lib/core/atoms.rb', line 17 def proc @proc end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
17 18 19 |
# File 'lib/core/atoms.rb', line 17 def tag @tag end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/core/atoms.rb', line 26 def to_s return "#{self.class},#{@tag},#{@method},#{@deftemplate}" end |