Class: Hyperion::Filter
- Inherits:
-
Object
- Object
- Hyperion::Filter
- Defined in:
- lib/hyperion/filter.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(field, operator, value) ⇒ Filter
constructor
A new instance of Filter.
- #to_h ⇒ Object
Constructor Details
#initialize(field, operator, value) ⇒ Filter
Returns a new instance of Filter.
6 7 8 9 10 |
# File 'lib/hyperion/filter.rb', line 6 def initialize(field, operator, value) @operator = operator @field = field @value = value end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
4 5 6 |
# File 'lib/hyperion/filter.rb', line 4 def field @field end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
4 5 6 |
# File 'lib/hyperion/filter.rb', line 4 def operator @operator end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/hyperion/filter.rb', line 4 def value @value end |
Instance Method Details
#to_h ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/hyperion/filter.rb', line 12 def to_h { :operator => operator, :field => field, :value => value } end |