Method: Parser::AST::Node#assign_properties

Defined in:
lib/parser/ast/node.rb

#assign_properties(properties) ⇒ Object

Assigns various properties to this AST node. Currently only the location can be set.

Parameters:

  • properties (Hash)

Options Hash (properties):



30
31
32
33
34
35
36
# File 'lib/parser/ast/node.rb', line 30

def assign_properties(properties)
  if (location = properties[:location])
    location = location.dup if location.frozen?
    location.node = self
    @location = location
  end
end