Class: RademadeAdmin::Search::Part::Abstract
- Inherits:
-
Object
- Object
- RademadeAdmin::Search::Part::Abstract
- Defined in:
- app/services/search/part/abstract.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
- #add(field, value) ⇒ Object
-
#initialize ⇒ Abstract
constructor
A new instance of Abstract.
- #sub_add(part) ⇒ Object
- #sub_unshift(part) ⇒ Object
- #unshift(field, value) ⇒ Object
Constructor Details
#initialize ⇒ Abstract
Returns a new instance of Abstract.
8 9 10 |
# File 'app/services/search/part/abstract.rb', line 8 def initialize @parts = [] end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
6 7 8 |
# File 'app/services/search/part/abstract.rb', line 6 def parts @parts end |
Instance Method Details
#add(field, value) ⇒ Object
12 13 14 |
# File 'app/services/search/part/abstract.rb', line 12 def add(field, value) @parts << part_object(field, value) end |
#sub_add(part) ⇒ Object
20 21 22 |
# File 'app/services/search/part/abstract.rb', line 20 def sub_add(part) @parts << part end |
#sub_unshift(part) ⇒ Object
24 25 26 |
# File 'app/services/search/part/abstract.rb', line 24 def sub_unshift(part) @parts.unshift part end |
#unshift(field, value) ⇒ Object
16 17 18 |
# File 'app/services/search/part/abstract.rb', line 16 def unshift(field, value) @parts.unshift(part_object(field, value)) end |