lib/sifttter_redux/configuration.rb in sifttter-redux-0.4.0 vs lib/sifttter_redux/configuration.rb in sifttter-redux-0.4.1
- old
+ new
@@ -17,11 +17,11 @@
# ----------------------------------------------------
def self.[](section_name)
if section_exists?(section_name)
@data[section_name]
else
- error = "Section does not exist: #{section_name}"
+ error = "Section does not exist: #{ section_name }"
Methadone::CLILogging.error(error)
fail ArgumentError, error
end
end
@@ -37,11 +37,11 @@
def self.[]=(section_name, hash)
if hash.is_a?(Hash)
@data[section_name] = {}
@data[section_name].merge!(hash)
else
- error = "Parameter is not a Hash: #{hash}"
+ error = "Parameter is not a Hash: #{ hash }"
Methadone::CLILogging.error(error)
fail ArgumentError, error
end
end
@@ -54,11 +54,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
@@ -79,10 +79,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