Module: HP::Cloud::Mangler::Settings

Extended by:
Settings
Included in:
Settings
Defined in:
lib/hpcloudmangler/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_settingsObject (readonly)

Returns the value of attribute _settings.



9
10
11
# File 'lib/hpcloudmangler/settings.rb', line 9

def _settings
  @_settings
end

Instance Method Details

#load!(filename, options = {}) ⇒ Object

This is the main point of entry - we call Settings.load! and provide a name of the file to read as it’s argument. We can also pass in some options.



13
14
15
# File 'lib/hpcloudmangler/settings.rb', line 13

def load!(filename, options = {})
  @_settings = MultiJson.decode(IO.read(filename), :symbolize_names => true).merge options
end