Class: Aptible::CLI::Formatter::Object
- Defined in:
- lib/aptible/cli/formatter/object.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
-
#initialize ⇒ Object
constructor
A new instance of Object.
- #keyed_object(k, object_key, &block) ⇒ Object
- #list(k, &block) ⇒ Object
- #object(k, &block) ⇒ Object
- #value(k, v) ⇒ Object
Constructor Details
#initialize ⇒ Object
Returns a new instance of Object.
7 8 9 |
# File 'lib/aptible/cli/formatter/object.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/object.rb', line 5 def children @children end |
Instance Method Details
#keyed_object(k, object_key, &block) ⇒ Object
19 20 21 |
# File 'lib/aptible/cli/formatter/object.rb', line 19 def keyed_object(k, object_key, &block) assign_child(k, KeyedObject.new(object_key), &block) end |
#list(k, &block) ⇒ Object
23 24 25 |
# File 'lib/aptible/cli/formatter/object.rb', line 23 def list(k, &block) assign_child(k, List.new, &block) end |