Module: Ruby::Conversions
- Included in:
- Ruby, Node
- Defined in:
- lib/ruby/node/conversions.rb
Defined Under Namespace
Modules: ClassMethods, List, Statements, Token
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(target) ⇒ Object
4
5
6
|
# File 'lib/ruby/node/conversions.rb', line 4
def included(target)
target.send(:extend, ClassMethods)
end
|
Instance Method Details
#to_node(node, position, prolog) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/ruby/node/conversions.rb', line 9
def to_node(node, position, prolog)
node = self.class.from_native(node) unless node.is_a?(Node)
node.position = position
node.prolog = prolog
node
end
|