Class: TrelloScrum::Cli

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

Instance Method Summary collapse

Instance Method Details

#pdf(outfile) ⇒ Object



21
22
23
24
25
# File 'lib/cli.rb', line 21

def pdf(outfile)
  setup_trello
  cards = get_cards
  generate_pdf(cards, outfile)
end

#setup(developer_public_key, member_token, board_id = nil) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/cli.rb', line 43

def setup(developer_public_key, member_token, board_id=nil)
  self.config["developer_public_key"] = developer_public_key
  self.config["member_token"] = member_token
  self.config["board_id"] = board_id if board_id

  File.open(options.config, "w") do |f|
    f.write JSON.pretty_generate(self.config)
  end

  puts "New config written to #{options.config}"
end