class Awssh::Config

Constants

DEFAULT

Attributes

data[R]

Public Class Methods

data() click to toggle source
# File lib/awssh/config.rb, line 11
def data
  raise 'config not loaded?' unless @instance.data
  @instance.data
end
load(file) click to toggle source
# File lib/awssh/config.rb, line 7
def load(file)
  @instance = new(file)
end
new(file) click to toggle source
# File lib/awssh/config.rb, line 19
def initialize(file)
  @file = File.expand_path(file)
  yaml = File.exist?(@file) ? YAML.load_file(file) : {}
  @data = OpenStruct.new(yaml)
end