Class: Arelastic::Queries::Script
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Script
- Defined in:
- lib/arelastic/queries/script.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(script, options = {}) ⇒ Script
constructor
A new instance of Script.
Methods inherited from Query
#has_child, #has_parent, #negate, #nested
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(script, options = {}) ⇒ Script
Returns a new instance of Script.
6 7 8 9 |
# File 'lib/arelastic/queries/script.rb', line 6 def initialize script, = {} @script = script @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/queries/script.rb', line 4 def @options end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
4 5 6 |
# File 'lib/arelastic/queries/script.rb', line 4 def script @script end |
Instance Method Details
#as_elastic ⇒ Object
11 12 13 14 |
# File 'lib/arelastic/queries/script.rb', line 11 def as_elastic params = {"script" => script}.update() {"script" => params} end |