Sha256: 48e927da6f53031ae73059f9749c0150b0c9ba8e46bf12bd4f8e6e3318be1ed0

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

module RestfulObjects
  class PropertyList
    extend Forwardable

    def initialize(domain_type)
      @properties = Hash.new
      @domain_type = domain_type
    end

    def add(id, return_type, options = {})
      options[:member_order] ||= count + 1
      @properties[id] = PropertyDescription.new(id, @domain_type, return_type, options)
    end

    def_delegators :@properties, :[], :each, :include?, :count, :empty?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restful_objects-0.0.2 lib/restful_objects/property_list.rb
restful_objects-0.0.1 lib/restful_objects/property_list.rb