Class: Arelastic::Queries::Limit
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Limit
- Defined in:
- lib/arelastic/queries/limit.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(value) ⇒ Limit
constructor
A new instance of Limit.
Methods inherited from Query
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(value) ⇒ Limit
Returns a new instance of Limit.
6 7 8 |
# File 'lib/arelastic/queries/limit.rb', line 6 def initialize value @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/arelastic/queries/limit.rb', line 4 def value @value end |
Instance Method Details
#as_elastic ⇒ Object
10 11 12 |
# File 'lib/arelastic/queries/limit.rb', line 10 def as_elastic {"limit" => {"value" => value}} end |