Class: RestfulObjects::PropertyList
- Inherits:
-
Object
- Object
- RestfulObjects::PropertyList
- Extended by:
- Forwardable
- Defined in:
- lib/restful_objects/property_list.rb
Instance Method Summary collapse
- #add(id, return_type, options = {}) ⇒ Object
-
#initialize(domain_type) ⇒ PropertyList
constructor
A new instance of PropertyList.
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, = {}) [:member_order] ||= count + 1 @properties[id] = PropertyDescription.new(id, @domain_type, return_type, ) end |