Module: Eson::Search::Node

Defined in:
lib/eson/search/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args.



5
6
7
# File 'lib/eson/search/node.rb', line 5

def args
  @args
end

#contextObject

Returns the value of attribute context.



4
5
6
# File 'lib/eson/search/node.rb', line 4

def context
  @context
end

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/eson/search/node.rb', line 6

def options
  @options
end

Instance Method Details

#param(name) ⇒ Object



8
9
10
# File 'lib/eson/search/node.rb', line 8

def param(name)
  args[name] || (raise "Parameter #{name} not given")
end

#to_query_hashObject



16
17
18
19
20
21
22
23
24
# File 'lib/eson/search/node.rb', line 16

def to_query_hash
  values = options

  if defined?(super)
    values = values.merge(super)
  end

  { name => values }
end