Class: RestfulObjects::ActionList
- Inherits:
-
Object
- Object
- RestfulObjects::ActionList
- Extended by:
- Forwardable
- Defined in:
- lib/restful_objects/action_list.rb
Instance Method Summary collapse
- #add(id, result_type, parameters = {}, options = {}) ⇒ Object
-
#initialize(domain_type) ⇒ ActionList
constructor
A new instance of ActionList.
Constructor Details
#initialize(domain_type) ⇒ ActionList
Returns a new instance of ActionList.
5 6 7 8 |
# File 'lib/restful_objects/action_list.rb', line 5 def initialize(domain_type) @actions = Hash.new @domain_type = domain_type end |
Instance Method Details
#add(id, result_type, parameters = {}, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/restful_objects/action_list.rb', line 10 def add(id, result_type, parameters = {}, = {}) [:member_order] ||= count + 1 @actions[id] = ActionDescription.new(id, result_type, @domain_type, parameters, ) end |