class AwsEc2::Config

Public Class Methods

new(options={}) click to toggle source
Calls superclass method AwsEc2::Base::new
# File lib/aws_ec2/config.rb, line 5
def initialize(options={})
  super
  @path = options[:path] || "#{AwsEc2.root}/config/#{AwsEc2.env}.yml"
end

Public Instance Methods

data() click to toggle source
# 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.message
  puts "The #{@path} does not exist. Please double check that it exists."
  exit
end