Class: Rubill::Query::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/rubill/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field, op, value) ⇒ Filter

Returns a new instance of Filter.



85
86
87
# File 'lib/rubill/query.rb', line 85

def initialize(field, op, value)
  self.field, self.op, self.value = field, op, value
end

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



81
82
83
# File 'lib/rubill/query.rb', line 81

def field
  @field
end

#opObject

Returns the value of attribute op.



82
83
84
# File 'lib/rubill/query.rb', line 82

def op
  @op
end

#valueObject

Returns the value of attribute value.



83
84
85
# File 'lib/rubill/query.rb', line 83

def value
  @value
end

Instance Method Details

#to_hashObject



89
90
91
92
93
94
95
# File 'lib/rubill/query.rb', line 89

def to_hash
  {
    field: field,
    op: op,
    value: value,
  }
end