Class: Yudachi::CLI
- Inherits:
-
Object
- Object
- Yudachi::CLI
- Defined in:
- lib/yudachi/cli.rb
Instance Method Summary collapse
- #app_id ⇒ Object
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #location_name ⇒ Object
- #run ⇒ Object
- #slack_url ⇒ Object
Constructor Details
Instance Method Details
#app_id ⇒ Object
12 13 14 |
# File 'lib/yudachi/cli.rb', line 12 def app_id ENV.fetch('YUDACHI_YAHOO_JAPAN_APP_ID') end |
#location_name ⇒ Object
16 17 18 |
# File 'lib/yudachi/cli.rb', line 16 def location_name ENV.fetch('YUDACHI_LOCATION') end |
#run ⇒ Object
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_url ⇒ Object
20 21 22 |
# File 'lib/yudachi/cli.rb', line 20 def slack_url ENV.fetch('YUDACHI_SLACK_URL') end |