Sha256: d866a655ad72f931b36e80968d463aad0b1ef2949d5e0ead7b12e49c35eb115b
Contents?: true
Size: 696 Bytes
Versions: 12
Compression:
Stored size: 696 Bytes
Contents
module Contentful module Management module Resource # Useful methods for array-like resources that can be included if an # :items property exists module ArrayLike include Enumerable # Returns true for array-like resources def array? true end # Delegates to items#each def each_item(&block) items.each(&block) end alias_method :each, :each_item # Delegates to items#empty? def empty? items.empty? end # Delegetes to items#size def size items.size end alias_method :length, :size end end end end
Version data entries
12 entries across 12 versions & 1 rubygems