Class: Ruleby::Core::FunctionAtom
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
Attributes inherited from Atom
Instance Method Summary collapse
-
#initialize(tag, template, arguments, block) ⇒ FunctionAtom
constructor
A new instance of FunctionAtom.
- #shareable?(atom) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(tag, template, arguments, block) ⇒ FunctionAtom
Returns a new instance of FunctionAtom.
63 64 65 66 67 68 69 |
# File 'lib/core/atoms.rb', line 63 def initialize(tag, template, arguments, block) @tag = tag @slot = nil @template = template @arguments = arguments @proc = block end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
61 62 63 |
# File 'lib/core/atoms.rb', line 61 def arguments @arguments end |
Instance Method Details
#shareable?(atom) ⇒ Boolean
71 72 73 74 75 76 |
# File 'lib/core/atoms.rb', line 71 def shareable?(atom) FunctionAtom === atom && @template == atom.template && @arguments == atom.arguments && @proc == atom.proc end |
#to_s ⇒ Object
78 79 80 |
# File 'lib/core/atoms.rb', line 78 def to_s "#{self.class},#{@template},#{@arguments.inspect}" end |