lib/sifttter_redux/configuration.rb in sifttter-redux-0.3.5 vs lib/sifttter_redux/configuration.rb in sifttter-redux-0.3.6
- old
+ new
@@ -31,11 +31,13 @@
def self.[]=(section_name, hash)
if hash.is_a?(Hash)
@data[section_name] = {}
@data[section_name].merge!(hash)
else
- fail ArgumentError, "Parameter is not a Hash: #{hash}"
+ error = "Parameter is not a Hash: #{hash}"
+ Methadone::CLILogging.error(error)
+ fail ArgumentError, error
end
end
# ----------------------------------------------------
# add_section method
@@ -46,11 +48,11 @@
# ----------------------------------------------------
def self.add_section(section_name)
if !self.section_exists?(section_name)
@data[section_name] = {}
else
- CliMessage.warning("Can't create already-existing section: #{section_name}")
+ CLIMessage.warning("Can't create already-existing section: #{section_name}")
end
end
# ----------------------------------------------------
# config_path method
@@ -71,10 +73,10 @@
# ----------------------------------------------------
def self.delete_section(section_name)
if self.section_exists?(section_name)
@data.delete(section_name)
else
- CliMessage.warning("Can't delete non-existing section: #{section_name}")
+ CLIMessage.warning("Can't delete non-existing section: #{section_name}")
end
end
# ----------------------------------------------------
# dump method