Class: Ansr::Arel::Nodes::Facet
Instance Attribute Summary
#expr, #opts
Instance Method Summary
collapse
#initialize, #method_missing
Instance Method Details
#limit(*val) ⇒ Object
32
33
34
35
|
# File 'lib/ansr/arel/nodes.rb', line 32
def limit(*val)
@opts[:limit] = val.first.to_s if val.first
@opts[:limit]
end
|
#order(*val) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/ansr/arel/nodes.rb', line 19
def order(*val)
if val.first
val = val.first.downcase.to_sym if String === val
@opts[:order] = val if val == :asc or val == :desc
end
@opts[:order]
end
|
#prefix(*val) ⇒ Object
27
28
29
30
|
# File 'lib/ansr/arel/nodes.rb', line 27
def prefix(*val)
@opts[:prefix] = val.first.to_s if val.first
@opts[:prefix]
end
|