Sha256: 4d4a4dbc6eed5c784499386244dc99bda7bd1e666a56be155dc00ed224e21daf

Contents?: true

Size: 407 Bytes

Versions: 12

Compression:

Stored size: 407 Bytes

Contents

module Lhj
  # config
  class Config
    def home_dir
      @home_dir ||= Pathname.new('~/.lhj').expand_path
    end

    def self.instance
      @instance ||= new
    end

    class << self
      attr_writer :instance
    end

    # Provides support for accessing the configuration instance in other
    # scopes.
    #
    module Mixin
      def config
        Config.instance
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lhj-tools-0.1.16 lib/lhj/config.rb
lhj-tools-0.1.13 lib/lhj/config.rb
lhj-tools-0.1.12 lib/lhj/config.rb
lhj-tools-0.1.11 lib/lhj/config.rb
lhj-tools-0.1.10 lib/lhj/config.rb
lhj-tools-0.1.9 lib/lhj/config.rb
lhj-tools-0.1.8 lib/lhj/config.rb
lhj-tools-0.1.7 lib/lhj/config.rb
lhj-tools-0.1.6 lib/lhj/config.rb
lhj-tools-0.1.5 lib/lhj/config.rb
lhj-tools-0.1.4 lib/lhj/config.rb
lhj-tools-0.1.3 lib/lhj/config.rb