Sha256: 26dd7bc7b7a0c1e7e3a23e16e917722ed9c102e26925fed9fa328cf8104e3d26

Contents?: true

Size: 324 Bytes

Versions: 3

Compression:

Stored size: 324 Bytes

Contents

module RockConfig
  class Config
    def initialize(hash)
      @hash = hash
    end

    def method_missing(*args, &block)
      if value = @hash[args.first.to_s]
        if Hash === value
          Config.new(value)
        else
          value
        end
      end
    end

    def raw
      @hash.dup
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rock_config-0.0.3 lib/rock_config/config.rb
rock_config-0.0.2 lib/rock_config/config.rb
rock_config-0.0.1 lib/rock_config/config.rb