Sha256: a9b8fe7a4315ecc7dd5239021e2f2f46e369803995d7d1131d6e326eee09ee99
Contents?: true
Size: 466 Bytes
Versions: 3
Compression:
Stored size: 466 Bytes
Contents
module RestfulObjects class CollectionList extend Forwardable def initialize(domain_type) @domain_type = domain_type @collections = Hash.new end def add(name, type, options = {}) options[:member_order] ||= count + 1 @collections[name] = CollectionDescription.new(name, type, @domain_type, options) end def_delegators :@collections, :[], :each, :each_key, :each_value, :include?, :count, :empty?, :clear end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
restful_objects-0.0.5 | lib/restful_objects/collection_list.rb |
restful_objects-0.0.4 | lib/restful_objects/collection_list.rb |
restful_objects-0.0.3 | lib/restful_objects/collection_list.rb |