Class: Janeway::Interpreters::ChildSegmentDeleter

Inherits:
ChildSegmentInterpreter show all
Defined in:
lib/janeway/interpreters/child_segment_deleter.rb

Overview

Child segment interpreter with selectors that delete matching elements

Constant Summary

Constants inherited from Base

Base::NOTHING

Instance Attribute Summary

Attributes inherited from Base

#next, #node

Instance Method Summary collapse

Methods inherited from ChildSegmentInterpreter

#as_json, #interpret, #push

Methods inherited from Base

#as_json, #interpret, #selector, #to_s, #type

Constructor Details

#initialize(child_segment) ⇒ ChildSegmentDeleter

Returns a new instance of ChildSegmentDeleter.

Parameters:



10
11
12
13
14
15
16
# File 'lib/janeway/interpreters/child_segment_deleter.rb', line 10

def initialize(child_segment)
  super
  @selectors =
    child_segment.map do |expr|
      TreeConstructor.ast_node_to_deleter(expr)
    end
end