class Aptible::CLI::Formatter::List

Attributes

children[R]

Public Class Methods

new() click to toggle source
# File lib/aptible/cli/formatter/list.rb, line 7
def initialize
  @children = []
end

Public Instance Methods

list() { |l| ... } click to toggle source
# File lib/aptible/cli/formatter/list.rb, line 24
def list
  l = List.new
  yield l
  @children << l
  nil
end
object() { |o| ... } click to toggle source
# File lib/aptible/cli/formatter/list.rb, line 17
def object
  o = Object.new
  yield o
  @children << o
  nil
end
value(s) click to toggle source
# File lib/aptible/cli/formatter/list.rb, line 11
def value(s)
  # TODO: Fail if block?
  @children << Value.new(s)
  nil
end