Class: Druid::HavingOperator
Instance Method Summary
collapse
#clause?, #operator?
#as_json, #to_json, #to_s
Constructor Details
Returns a new instance of HavingOperator.
49
50
51
52
|
# File 'lib/druid/having.rb', line 49
def initialize(type)
@type = type
@elements = []
end
|
Instance Method Details
#add(element) ⇒ Object
58
59
60
|
# File 'lib/druid/having.rb', line 58
def add(element)
@elements << element
end
|
#and? ⇒ Boolean
54
55
56
|
# File 'lib/druid/having.rb', line 54
def and?
@type == 'and'
end
|
#to_hash ⇒ Object
62
63
64
65
66
67
|
# File 'lib/druid/having.rb', line 62
def to_hash
{
:type => @type,
:havingSpecs => @elements
}
end
|