class Rephrase::FakeNode
Class for faking a node
Attributes
children[R]
Node children @return [Array]
type[R]
Node type @return [Symbol]
Public Class Methods
iter_scope(children)
click to toggle source
Constructs a FakeNode
with type ‘:ITER_SCOPE`. @param children [Array] child nodes
# File lib/rephrase.rb, line 17 def self.iter_scope(children) new(:ITER_SCOPE, children) end
list(children)
click to toggle source
Constructs a FakeNode
with type ‘:LIST_EMBEDDED`. @param children [Array] child nodes
# File lib/rephrase.rb, line 11 def self.list(children) new(:LIST_EMBEDDED, children) end
new(type, children)
click to toggle source
Initializes a FakeNode
. @param type [Symbol] node type @param children [Array] child nodes
# File lib/rephrase.rb, line 32 def initialize(type, children) @type = type @children = children end