Class: Ruote::RubyDsl::BranchContext
Instance Method Summary
collapse
Constructor Details
#initialize(name, attributes) ⇒ BranchContext
102
103
104
105
106
107
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 102
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
109
110
111
112
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 109
def method_missing(m, *args, &block)
@children.push(Ruote::RubyDsl.create_branch(m.to_s, args, &block))
end
|
Instance Method Details
#to_a ⇒ Object
114
115
116
117
|
# File 'lib/ruote/reader/ruby_dsl.rb', line 114
def to_a
[ @name, @attributes, @children ]
end
|