Class: CircleCI::CLI::Printer::ProjectPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/circleci/cli/printer/project_printer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(projects, pretty: true) ⇒ ProjectPrinter

Returns a new instance of ProjectPrinter.



8
9
10
11
# File 'lib/circleci/cli/printer/project_printer.rb', line 8

def initialize(projects, pretty: true)
  @projects = projects
  @pretty = pretty
end

Instance Attribute Details

#compactObject

Returns the value of attribute compact.



7
8
9
# File 'lib/circleci/cli/printer/project_printer.rb', line 7

def compact
  @compact
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/circleci/cli/printer/project_printer.rb', line 13

def to_s
  @pretty ? print_pretty : print_compact
end