Class: Refinuri::Base::Filter
- Inherits:
-
Object
- Object
- Refinuri::Base::Filter
- Defined in:
- lib/refinuri/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #delete(value) ⇒ Object
-
#initialize(name, value) ⇒ Filter
constructor
A new instance of Filter.
- #to_db ⇒ Object
- #update(value) ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
91 92 93 |
# File 'lib/refinuri/base.rb', line 91 def name @name end |
#value ⇒ Object (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_db ⇒ Object
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 |