Sha256: 8b462b66d915ef5da62a8e33e6ec6759e17a6a2ab79dbce8c24ce05527275578

Contents?: true

Size: 382 Bytes

Versions: 4

Compression:

Stored size: 382 Bytes

Contents

module Redbreast
  module IO
    # Used for reading and writing to config file
    class Config
      CONFIG_FILE_PATH = "#{Dir.pwd}/.redbrest.yml"

      class << self
        def write(data)
          File.open(CONFIG_FILE_PATH, 'w') { |file| YAML.dump(data, file) }
        end

        def read
          YAML.load_file(CONFIG_FILE_PATH)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redbreast-1.0.3 lib/redbreast/io/config.rb
redbreast-1.0.2 lib/redbreast/io/config.rb
redbreast-1.0.1 lib/redbreast/io/config.rb
redbreast-1.0.0 lib/redbreast/io/config.rb