lib/bowline/app_config.rb in bowline-0.6.3 vs lib/bowline/app_config.rb in bowline-0.9.1

- old
+ new

@@ -7,18 +7,28 @@ class << self def instance @instance ||= create end - def marshal_records(record = nil) + def marshal_records=(record) self.instance.load(record.attributes) if record self.instance end + def marshal_records + self.instance + end + def load!(path) self.instance.load_path(path) self.instance end + + def reset! + @instance = nil + end + alias_method :destroy_all, :reset! + alias_method :delete_all, :reset! end def load_path(path) return unless path && File.exist?(path) load(YAML::load(File.read(path))) \ No newline at end of file