Class: Rjq::AST::CapturedFilter

Inherits:
Node
  • Object
show all
Defined in:
lib/rjq/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#source_span

Instance Method Summary collapse

Methods inherited from Node

#assign_value, #invalid_path_message, #with_source_span

Constructor Details

#initialize(node, captured_context) ⇒ CapturedFilter

Returns a new instance of CapturedFilter.



169
170
171
172
# File 'lib/rjq/ast.rb', line 169

def initialize(node, captured_context)
  @node = node
  @captured_context = captured_context
end

Instance Attribute Details

#captured_contextObject (readonly)

Returns the value of attribute captured_context.



167
168
169
# File 'lib/rjq/ast.rb', line 167

def captured_context
  @captured_context
end

#nodeObject (readonly)

Returns the value of attribute node.



167
168
169
# File 'lib/rjq/ast.rb', line 167

def node
  @node
end

Instance Method Details

#eval(input, _context) ⇒ Object



174
175
176
# File 'lib/rjq/ast.rb', line 174

def eval(input, _context)
  node.eval(input, captured_context)
end

#paths(input, _context) ⇒ Object



182
183
184
# File 'lib/rjq/ast.rb', line 182

def paths(input, _context)
  node.paths(input, captured_context)
end

#take(input, _context, count) ⇒ Object



178
179
180
# File 'lib/rjq/ast.rb', line 178

def take(input, _context, count)
  node.take(input, captured_context, count)
end