Class: Refinuri::Base::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/refinuri/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Filter

Returns a new instance of Filter.



92
93
94
95
# File 'lib/refinuri/base.rb', line 92

def initialize(name,value)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



91
92
93
# File 'lib/refinuri/base.rb', line 91

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



91
92
93
# File 'lib/refinuri/base.rb', line 91

def value
  @value
end

Instance Method Details

#delete(value) ⇒ Object



101
102
103
# File 'lib/refinuri/base.rb', line 101

def delete(value)
  @value = nil
end

#to_dbObject



105
106
107
# File 'lib/refinuri/base.rb', line 105

def to_db
  { @name => @value }
end

#update(value) ⇒ Object



97
98
99
# File 'lib/refinuri/base.rb', line 97

def update(value)
  @value = value
end