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.



77
78
79
# File 'lib/rubill/query.rb', line 77

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.



73
74
75
# File 'lib/rubill/query.rb', line 73

def field
  @field
end

#opObject

Returns the value of attribute op.



74
75
76
# File 'lib/rubill/query.rb', line 74

def op
  @op
end

#valueObject

Returns the value of attribute value.



75
76
77
# File 'lib/rubill/query.rb', line 75

def value
  @value
end

Instance Method Details

#to_hashObject



81
82
83
84
85
86
87
# File 'lib/rubill/query.rb', line 81

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