Sha256: a076f23697194c4ebc385e0b4514c49383316bc521867c3e60432421e26f9034

Contents?: true

Size: 334 Bytes

Versions: 4

Compression:

Stored size: 334 Bytes

Contents

require 'yaml'

module Dots
  # Represents the config/packages.yml file.
  class Packages
    def initialize
      @config = YAML::load_file from_yaml_file_path
    end

    def for language
      @config[language]
    end

  private
    def from_yaml_file_path
      File.expand_path("~/.dots/config/packages.yml")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zsh_dots-0.6.5 lib/ruby/dots/packages.rb
zsh_dots-0.6.3 lib/ruby/dots/packages.rb
zsh_dots-0.6.2 lib/ruby/dots/packages.rb
zsh_dots-0.6.0 lib/ruby/dots/packages.rb