Sha256: c223084798f35c1b41e3c24df74268c0c3e96a1854e4a2ff9cb580e37448a69b

Contents?: true

Size: 342 Bytes

Versions: 2

Compression:

Stored size: 342 Bytes

Contents

module NsOptions

  class Namespaces < Hash

    def [](name)
      super(name.to_sym)
    end
    def []=(name, value)
      super(name.to_sym, value)
    end

    def add(name, key, parent = nil, &block)
      self[name] = NsOptions::Helper.new_namespace(key, parent, &block)
    end

    def get(name)
      self[name]
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ns-options-0.1.1 lib/ns-options/namespaces.rb
ns-options-0.1.0 lib/ns-options/namespaces.rb