lib/hammer_cli/settings.rb in hammer_cli-0.15.0 vs lib/hammer_cli/settings.rb in hammer_cli-0.15.1
- old
+ new
@@ -44,10 +44,15 @@
def self.load(settings_hash)
deep_merge!(settings, settings_hash)
end
def self.clear
+ empty
+ load(default_settings)
+ end
+
+ def self.empty
settings.clear
path_history.clear
end
def self.dump
@@ -57,12 +62,19 @@
def self.path_history
@path_history ||= []
@path_history
end
+ def self.default_settings
+ {
+ :use_defaults => true
+ }
+ end
+
private
+
def self.settings
- @settings_hash ||= {}
+ @settings_hash ||= default_settings
@settings_hash
end
def self.deep_merge!(h, other_h)
other_h = symbolize_hash(other_h)