Class: Ec2spec::CLI
- Inherits:
-
Thor
- Object
- Thor
- Ec2spec::CLI
- Defined in:
- lib/ec2spec/cli.rb
Instance Method Summary collapse
-
#ssh ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength.
Instance Method Details
#ssh ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ec2spec/cli.rb', line 17 def ssh hosts = ['host'] days = ['days'] rate = ['rate'] unit = ['unit'] app_id = ['app_id'] calc_type = ['calc_type'] format = ['format'] || :plain_text region = ['region'] || 'ap-northeast-1' Ec2spec.logger.level = Logger::DEBUG if ['debug'] client = Ec2spec::Client.new(hosts, days, format, region) if exchange_unit?(unit, rate, app_id) client.prepare_price_calculator(unit, rate, calc_type, app_id) end puts client.run end |