Class: Demeter::Commands::Base
- Inherits:
-
Object
- Object
- Demeter::Commands::Base
- Defined in:
- lib/demeter/commands/base.rb
Instance Method Summary collapse
- #check_path ⇒ Object
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(options) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 12 13 |
# File 'lib/demeter/commands/base.rb', line 6 def initialize() check_path ENV['DEMETER_ENV'] = ['environment'] Dotenv.load(".env.#{options['environment']}") ::Aws.config.update(:logger => Logger.new(STDOUT)) @ec2 = ::Aws::EC2::Client.new() = end |
Instance Method Details
#check_path ⇒ Object
15 16 17 18 |
# File 'lib/demeter/commands/base.rb', line 15 def check_path fail "configs directory not found!" if !File.directory?('./configs') fail "variables directory not found!" if !File.directory?('./variables') end |