Class: JMESPath::Nodes::MultiSelectList Private
- Defined in:
- lib/jmespath/nodes/multi_select_list.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(children) ⇒ MultiSelectList
constructor
private
A new instance of MultiSelectList.
- #optimize ⇒ Object private
- #visit(value) ⇒ Object private
Methods inherited from Node
Constructor Details
#initialize(children) ⇒ MultiSelectList
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MultiSelectList.
6 7 8 |
# File 'lib/jmespath/nodes/multi_select_list.rb', line 6 def initialize(children) @children = children end |
Instance Method Details
#optimize ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/jmespath/nodes/multi_select_list.rb', line 18 def optimize self.class.new(@children.map(&:optimize)) end |
#visit(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 13 14 15 16 |
# File 'lib/jmespath/nodes/multi_select_list.rb', line 10 def visit(value) if value.nil? value else @children.map { |n| n.visit(value) } end end |