Sha256: 58bc64227077a4eccb5a3a6c561097d33891564c80a72d3eb6311db19c01128d

Contents?: true

Size: 396 Bytes

Versions: 3

Compression:

Stored size: 396 Bytes

Contents

module RestfulObjects
  class ActionList
    extend Forwardable

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
restful_objects-0.0.5 lib/restful_objects/action_list.rb
restful_objects-0.0.4 lib/restful_objects/action_list.rb
restful_objects-0.0.3 lib/restful_objects/action_list.rb