Class: Aptible::CLI::Formatter::List
- Defined in:
- lib/aptible/cli/formatter/list.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
-
#initialize ⇒ List
constructor
A new instance of List.
- #list {|l| ... } ⇒ Object
- #object {|o| ... } ⇒ Object
- #value(s) ⇒ Object
Constructor Details
#initialize ⇒ List
Returns a new instance of List.
7 8 9 |
# File 'lib/aptible/cli/formatter/list.rb', line 7 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
5 6 7 |
# File 'lib/aptible/cli/formatter/list.rb', line 5 def children @children end |
Instance Method Details
#list {|l| ... } ⇒ Object
24 25 26 27 28 29 |
# File 'lib/aptible/cli/formatter/list.rb', line 24 def list l = List.new yield l @children << l nil end |