Sha256: 48d31ddd5106545c14259b407a3c1b703ab7a21598dd87b4f7fe9744b3bde4c4

Contents?: true

Size: 417 Bytes

Versions: 12

Compression:

Stored size: 417 Bytes

Contents

module VimGolf
  class Config
    class << self
      def path
        "#{ENV['HOME']}/.vimgolf"
      end

      def put_path
        path + "/put"
      end

      def save(conf)
        File.open(path + '/config.yaml', 'w') do |f|
          YAML.dump(conf, f)
        end
      end

      def load
        File.open(path + '/config.yaml', 'r') do |f|
          YAML.load(f)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vimgolf-0.5.0 lib/vimgolf/config.rb
vimgolf-0.4.9 lib/vimgolf/config.rb
vimgolf-0.4.8 lib/vimgolf/config.rb
vimgolf-0.4.7 lib/vimgolf/config.rb
vimgolf-0.4.6 lib/vimgolf/config.rb
vimgolf-0.4.5 lib/vimgolf/config.rb
vimgolf-0.4.4 lib/vimgolf/config.rb
vimgolf-0.4.3 lib/vimgolf/config.rb
vimgolf-0.4.2 lib/vimgolf/config.rb
vimgolf-0.4.1 lib/vimgolf/config.rb
vimgolf-0.4.0 lib/vimgolf/config.rb
vimgolf-0.3.0 lib/vimgolf/config.rb