Class: RademadeAdmin::Search::Conditions::Where
- Inherits:
-
Object
- Object
- RademadeAdmin::Search::Conditions::Where
- Defined in:
- app/services/search/conditions/part/where.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #add(field, value) ⇒ Object
-
#initialize(type) ⇒ Where
constructor
A new instance of Where.
- #sub_add(where) ⇒ Object
Constructor Details
#initialize(type) ⇒ Where
Returns a new instance of Where.
9 10 11 12 |
# File 'app/services/search/conditions/part/where.rb', line 9 def initialize(type) @type = type @parts = [] end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
7 8 9 |
# File 'app/services/search/conditions/part/where.rb', line 7 def parts @parts end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'app/services/search/conditions/part/where.rb', line 7 def type @type end |
Instance Method Details
#add(field, value) ⇒ Object
14 15 16 17 18 19 |
# File 'app/services/search/conditions/part/where.rb', line 14 def add(field, value) @parts << { :field => field, :value => value } end |
#sub_add(where) ⇒ Object
21 22 23 |
# File 'app/services/search/conditions/part/where.rb', line 21 def sub_add(where) @parts << where end |