Class: Ruleby::Core::PropertyAtom
Overview
This kind of atom is used to match a simple condition.
For example:
a.person{ |p| p.is_a? Person }
So there are no references to other atoms.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Atom
#deftemplate, #method, #proc, #tag
Instance Method Summary collapse
Methods inherited from Atom
Constructor Details
This class inherits a constructor from Ruleby::Core::Atom
Instance Method Details
#==(atom) ⇒ Object
38 39 40 |
# File 'lib/core/atoms.rb', line 38 def ==(atom) return shareable?(atom) && @tag == atom.tag end |
#shareable?(atom) ⇒ Boolean
42 43 44 45 46 47 |
# File 'lib/core/atoms.rb', line 42 def shareable?(atom) return PropertyAtom === atom && @method == atom.method && @deftemplate == atom.deftemplate && @proc == atom.proc end |