Class: Ruote::RubyDsl::BranchContext
Instance Method Summary
collapse
Constructor Details
#initialize(name, attributes) ⇒ BranchContext
106
107
108
109
110
111
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 106
def initialize(name, attributes)
@name = name
@attributes = attributes
@children = []
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
113
114
115
116
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 113
def method_missing(m, *args, &block)
@children.push(Ruote::RubyDsl.create_branch(m.to_s, args, &block))
end
|
Instance Method Details
#to_a ⇒ Object
118
119
120
121
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 118
def to_a
[ @name, @attributes, @children ]
end
|