Sha256: ee916515296bb92e825b956f044fc96578a5db3d093f4a8392dbf930322ca88d

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

module RestfulObjects
  class ActionList
    extend Forwardable

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

    def add(id, result_type, parameters = {}, options = {})
      options[:member_order] ||= count + 1
      @actions[id] = ActionDescription.new(id, result_type, @domain_type, parameters, options)
    end

    def_delegators :@actions, :[], :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/action_list.rb
restful_objects-0.0.1 lib/restful_objects/action_list.rb