Class: Yello::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/yello/cli/login.rb,
lib/yello/cli/export.rb,
lib/yello/cli/import.rb

Instance Method Summary collapse

Instance Method Details

#exportObject



11
12
13
14
15
16
17
# File 'lib/yello/cli/export.rb', line 11

def export
  Yello.from_trello(board).tap do |result|
    output {|f|
      f.write(Yello.to_yaml(result))
    }
  end
end

#import(board) ⇒ Object



9
10
11
# File 'lib/yello/cli/import.rb', line 9

def import(board)
  Yello.import(board, Yello.from_yaml(input))
end

#loginObject



10
11
12
13
14
15
16
17
18
# File 'lib/yello/cli/login.rb', line 10

def 
  get_key
  key = ask('Enter Trello API key:')

  get_token(key)
  token = ask('Enter Trello member token:')

  Yello::Auth.set(key, token)  
end