Sha256: f4e2ce09977657500134fa6236e5bfcd0a253a709832b5cd5498ab50db4487fa

Contents?: true

Size: 258 Bytes

Versions: 15

Compression:

Stored size: 258 Bytes

Contents

module ThecoreSettings
  module Dumper
    def self.dump(path)
      ns = {}
      ThecoreSettings::Setting.each do |s|
        ns[s.ns] = {} if ns[s.ns].nil?
        ns[s.ns][s.key] = s.as_yaml
      end
      File.write(path, ns.to_yaml)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
thecore_settings-3.0.8 lib/thecore_settings/dumper.rb
thecore_settings-3.0.7 lib/thecore_settings/dumper.rb
thecore_settings-2.0.9 lib/thecore_settings/dumper.rb
thecore_settings-3.0.6 lib/thecore_settings/dumper.rb
thecore_settings-3.0.5 lib/thecore_settings/dumper.rb
thecore_settings-3.0.4 lib/thecore_settings/dumper.rb
thecore_settings-3.0.3 lib/thecore_settings/dumper.rb
thecore_settings-3.0.0 lib/thecore_settings/dumper.rb
thecore_settings-2.0.8 lib/thecore_settings/dumper.rb
thecore_settings-2.0.7 lib/thecore_settings/dumper.rb
thecore_settings-2.0.6 lib/thecore_settings/dumper.rb
thecore_settings-2.0.5 lib/thecore_settings/dumper.rb
thecore_settings-2.0.4 lib/thecore_settings/dumper.rb
thecore_settings-2.0.3 lib/thecore_settings/dumper.rb
thecore_settings-2.0.2 lib/thecore_settings/dumper.rb