Class: Squeel::Nodes::Sifter
- Includes:
- PredicateOperators
- Defined in:
- lib/squeel/nodes/sifter.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#eql?(other) ⇒ Boolean
(also: #==)
Compare with other objects.
-
#hash ⇒ Object
Implemented for equality testing.
-
#initialize(name, args) ⇒ Sifter
constructor
A new instance of Sifter.
Methods included from PredicateOperators
Methods inherited from Node
Constructor Details
#initialize(name, args) ⇒ Sifter
Returns a new instance of Sifter.
8 9 10 |
# File 'lib/squeel/nodes/sifter.rb', line 8 def initialize(name, args) @name, @args = name, args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
6 7 8 |
# File 'lib/squeel/nodes/sifter.rb', line 6 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/squeel/nodes/sifter.rb', line 6 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
Compare with other objects
18 19 20 21 22 |
# File 'lib/squeel/nodes/sifter.rb', line 18 def eql?(other) self.class.eql?(other.class) && self.name.eql?(other.name) && self.args.eql?(other.args) end |
#hash ⇒ Object
Implemented for equality testing
13 14 15 |
# File 'lib/squeel/nodes/sifter.rb', line 13 def hash [name, args].hash end |