Class: Cp8Cli::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/cp8_cli/main.rb

Instance Method Summary collapse

Constructor Details

#initialize(global_config = GlobalConfig.new) ⇒ Main

Returns a new instance of Main.



11
12
13
14
# File 'lib/cp8_cli/main.rb', line 11

def initialize(global_config = GlobalConfig.new)
  Trello::Base.configure(key: global_config.trello_key, token: global_config.trello_token)
  Github::Base.configure(token: global_config.github_token)
end

Instance Method Details

#ci ⇒ Object



28
29
30
# File 'lib/cp8_cli/main.rb', line 28

def ci
  Commands::Ci.new.run
end

#open ⇒ Object



20
21
22
# File 'lib/cp8_cli/main.rb', line 20

def open
  Commands::Open.new.run
end

#start(name) ⇒ Object



16
17
18
# File 'lib/cp8_cli/main.rb', line 16

def start(name)
  Commands::Start.new(name).run
end

#submit(options = {}) ⇒ Object



24
25
26
# File 'lib/cp8_cli/main.rb', line 24

def submit(options = {})
  Commands::Submit.new(options).run
end

#suggest ⇒ Object



32
33
34
# File 'lib/cp8_cli/main.rb', line 32

def suggest
  Commands::Suggest.new.run
end