Class: Yudachi::CLI

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

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



3
4
5
# File 'lib/yudachi/cli.rb', line 3

def initialize
  @runner = Runner.new
end

Instance Method Details

#app_idObject



12
13
14
# File 'lib/yudachi/cli.rb', line 12

def app_id
  ENV.fetch('YUDACHI_YAHOO_JAPAN_APP_ID')
end

#location_nameObject



16
17
18
# File 'lib/yudachi/cli.rb', line 16

def location_name
  ENV.fetch('YUDACHI_LOCATION')
end

#runObject



7
8
9
10
# File 'lib/yudachi/cli.rb', line 7

def run
  notifier = SlackNotifier.new(slack_url)
  Runner.new.run(app_id: app_id, location_name: location_name, notifier: notifier)
end

#slack_urlObject



20
21
22
# File 'lib/yudachi/cli.rb', line 20

def slack_url
  ENV.fetch('YUDACHI_SLACK_URL')
end