Sha256: 70a82865f0ab684adb0eeda55e85b4bb2394b2ce4d21f2f6fad303f5a72a1b06

Contents?: true

Size: 362 Bytes

Versions: 28

Compression:

Stored size: 362 Bytes

Contents

module LocalPac
  class Data
    private

    attr_reader :config

    public

    def initialize(config = LocalPac.config)
      @config = config
    end

    def instance_binding
      binding
    end

    def lookup(variable)
      config.public_send variable.to_sym
    rescue NoMethodError
      fail "Variable \"#{variable}\" not found."
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
local_pac-0.1.7 lib/local_pac/data.rb
local_pac-0.1.6 lib/local_pac/data.rb
local_pac-0.1.5 lib/local_pac/data.rb
local_pac-0.1.4 lib/local_pac/data.rb
local_pac-0.1.3 lib/local_pac/data.rb
local_pac-0.1.2 lib/local_pac/data.rb
local_pac-0.1.1 lib/local_pac/data.rb
local_pac-0.1.0 lib/local_pac/data.rb