Class: AwsEc2::Config
Constant Summary collapse
- @@data =
nil
Constants inherited from Base
Base::BUILD_ROOT, Base::SCRIPTS_INFO_PATH
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
5 6 7 8 |
# File 'lib/aws_ec2/config.rb', line 5 def initialize(={}) super @path = [:path] || "#{AwsEc2.root}/config/#{AwsEc2.env}.yml" end |
Instance Method Details
#data ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/aws_ec2/config.rb', line 11 def data return @@data if @@data @@data = YAML.load_file(@path) rescue Errno::ENOENT => e puts e. puts "The #{@path} does not exist. Please double check that it exists." exit end |