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.10.2 lib/local_pac/data.rb
local_pac-0.10.1 lib/local_pac/data.rb
local_pac-0.10.0 lib/local_pac/data.rb
local_pac-0.9.0 lib/local_pac/data.rb
local_pac-0.7.0 lib/local_pac/data.rb
local_pac-0.6.3 lib/local_pac/data.rb
local_pac-0.6.2 lib/local_pac/data.rb
local_pac-0.6.1 lib/local_pac/data.rb
local_pac-0.5.0 lib/local_pac/data.rb
local_pac-0.4.0 lib/local_pac/data.rb
local_pac-0.3.0 lib/local_pac/data.rb
local_pac-0.2.3 lib/local_pac/data.rb
local_pac-0.2.2 lib/local_pac/data.rb
local_pac-0.2.1 lib/local_pac/data.rb
local_pac-0.2.0 lib/local_pac/data.rb
local_pac-0.1.13 lib/local_pac/data.rb
local_pac-0.1.11 lib/local_pac/data.rb
local_pac-0.1.10 lib/local_pac/data.rb
local_pac-0.1.9 lib/local_pac/data.rb
local_pac-0.1.8 lib/local_pac/data.rb