Class: Omnis::Operators::NullOperator
- Inherits:
-
Object
- Object
- Omnis::Operators::NullOperator
- Defined in:
- lib/omnis/operators.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(key, value, opts = {}) ⇒ NullOperator
constructor
A new instance of NullOperator.
- #to_s ⇒ Object
Constructor Details
#initialize(key, value, opts = {}) ⇒ NullOperator
Returns a new instance of NullOperator.
5 6 7 |
# File 'lib/omnis/operators.rb', line 5 def initialize(key, value, opts={}) @key, @value, @opts = key, value, opts end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/omnis/operators.rb', line 4 def key @key end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
4 5 6 |
# File 'lib/omnis/operators.rb', line 4 def opts @opts end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/omnis/operators.rb', line 4 def value @value end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 12 13 |
# File 'lib/omnis/operators.rb', line 9 def ==(other) return false unless other.is_a? self.class return false unless @key == other.key @value == other.value end |
#to_s ⇒ Object
15 16 17 18 |
# File 'lib/omnis/operators.rb', line 15 def to_s klas = self.class.to_s.downcase.split('::')[-1] "#{@key.to_s} #{klas} #{@value}" end |