Class: Aptible::CLI::Formatter::Root
- Defined in:
- lib/aptible/cli/formatter/root.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #grouped_keyed_list(group, key, &block) ⇒ Object
-
#initialize ⇒ Root
constructor
A new instance of Root.
- #keyed_list(key, &block) ⇒ Object
- #keyed_object(key, &block) ⇒ Object
- #list(&block) ⇒ Object
- #object(&block) ⇒ Object
- #value(s) ⇒ Object
Constructor Details
#initialize ⇒ Root
Returns a new instance of Root.
7 8 9 |
# File 'lib/aptible/cli/formatter/root.rb', line 7 def initialize @root = nil end |
Instance Attribute Details
Instance Method Details
#grouped_keyed_list(group, key, &block) ⇒ Object
31 32 33 |
# File 'lib/aptible/cli/formatter/root.rb', line 31 def grouped_keyed_list(group, key, &block) assign_root(GroupedKeyedList.new(group, key), &block) end |
#keyed_list(key, &block) ⇒ Object
27 28 29 |
# File 'lib/aptible/cli/formatter/root.rb', line 27 def keyed_list(key, &block) assign_root(KeyedList.new(key), &block) end |
#keyed_object(key, &block) ⇒ Object
19 20 21 |
# File 'lib/aptible/cli/formatter/root.rb', line 19 def keyed_object(key, &block) assign_root(KeyedObject.new(key), &block) end |
#list(&block) ⇒ Object
23 24 25 |
# File 'lib/aptible/cli/formatter/root.rb', line 23 def list(&block) assign_root(List.new, &block) end |