Class: TrelloCli::CLI::List::List

Inherits:
Object
  • Object
show all
Defined in:
lib/trello_cli/cli/list/list.rb

Instance Method Summary collapse

Constructor Details

#initializeList

Returns a new instance of List.



6
7
8
# File 'lib/trello_cli/cli/list/list.rb', line 6

def initialize
  @options = {}
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/trello_cli/cli/list/list.rb', line 10

def run
  option_parser.parse!

  data = list_lists.map do |l|
    {
      id:   l.attributes[:id],
      name: l.attributes[:name]
    }
  end

  puts TrelloCli::Formatters::ListList.new(data).output @options[:output]
end