Class: Arelastic::Queries::Limit

Inherits:
Query show all
Defined in:
lib/arelastic/queries/limit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Query

#negate, #nested

Methods inherited from Nodes::Node

#==, #convert_to_elastic, #read_option!

Methods included from Arities::Binary

#binary

Methods included from Arities::Polyadic

#polyadic

Methods included from Arities::Unary

#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

#valueObject (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_elasticObject



10
11
12
# File 'lib/arelastic/queries/limit.rb', line 10

def as_elastic
  {"limit" => {"value" => value}}
end