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.



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

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



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

def to_s
  @pretty ? print_pretty : print_compact
end