Class: CodeDrivenDevelopment::TestComponent::BlankSlate
- Inherits:
-
Object
- Object
- CodeDrivenDevelopment::TestComponent::BlankSlate
- Defined in:
- lib/code_driven_development/test_component/blank_slate.rb
Instance Method Summary collapse
- #<<(child) ⇒ Object
- #indented_output(io = IndentedOutput.new) ⇒ Object
-
#initialize ⇒ BlankSlate
constructor
A new instance of BlankSlate.
Constructor Details
#initialize ⇒ BlankSlate
Returns a new instance of BlankSlate.
4 5 6 |
# File 'lib/code_driven_development/test_component/blank_slate.rb', line 4 def initialize @children = [] end |
Instance Method Details
#<<(child) ⇒ Object
14 15 16 |
# File 'lib/code_driven_development/test_component/blank_slate.rb', line 14 def << child @children << child end |
#indented_output(io = IndentedOutput.new) ⇒ Object
8 9 10 11 12 |
# File 'lib/code_driven_development/test_component/blank_slate.rb', line 8 def indented_output(io = IndentedOutput.new) @children.map do |child| child.indented_output(io) end.join end |