Class: RestfulObjects::PropertyList

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/restful_objects/property_list.rb

Instance Method Summary collapse

Constructor Details

#initialize(domain_type) ⇒ PropertyList

Returns a new instance of PropertyList.



5
6
7
8
# File 'lib/restful_objects/property_list.rb', line 5

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

Instance Method Details

#add(id, return_type, options = {}) ⇒ Object



10
11
12
13
# File 'lib/restful_objects/property_list.rb', line 10

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