Sha256: e29a4ea2a69de045edaac3622fe08ad2371e82a2e0526b6ade572ecee3b43d12

Contents?: true

Size: 198 Bytes

Versions: 1

Compression:

Stored size: 198 Bytes

Contents

module ActsAsApi
  #
  class ApiTemplate < Hash

    def add(val, options = {})
      self[(options[:as] || val).to_sym] = val
    end

    def remove(key)
      self.delete(key)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_api-0.3.0 lib/acts_as_api/api_template.rb