Sha256: cb095a9db60275183f7cc7e08f438ee66d7a87c7f2f1d04d7434a898a21e1b18

Contents?: true

Size: 200 Bytes

Versions: 7

Compression:

Stored size: 200 Bytes

Contents

require 'yaml'
module DbUtils
  def self.add(path, element)
    File.open(path, 'w') do |file|
      file.write(element.to_yaml)
    end
  end

  def self.get(path)
    YAML.load_file(path)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
codebreaker_paratskiy-0.2.0 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.9 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.8 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.7 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.6 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.5 lib/utils/db_utils.rb
codebreaker_paratskiy-0.1.3 lib/utils/db_utils.rb