Sha256: dd7cbad6c5cdb406ecc25e9aead229fd04f66ea28cb48c39a075b3a6cb2cdf00
Contents?: true
Size: 552 Bytes
Versions: 35
Compression:
Stored size: 552 Bytes
Contents
module Enumerable module ActsAsResourceConcern def self.included(base) base.extend(ClassMethods) end module ClassMethods def collection self::COLLECTION end def all collection.collect do |datum| new(datum) end end def find(id) all.select { |resource| resource.to_param == id }.first end def first all.first end def count all.size end end end end
Version data entries
35 entries across 35 versions & 1 rubygems