Sha256: 66c26f0d2b59c9b1c02a4619eae37d13913d3bc47bd4fc5ce6216c792780d03b

Contents?: true

Size: 328 Bytes

Versions: 2

Compression:

Stored size: 328 Bytes

Contents

module WerckerAPI
  module APICollection

    def self.included(klass)
      klass.class_eval do
        include Enumerable

        private
        attr_accessor :collection
      end
    end


    def initialize(collection = [])
      self.collection = collection
    end

    def each
      collection.each
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wercker_api-0.1.10 lib/wercker_api/api_collection.rb
wercker_api-0.1.7 lib/wercker_api/api_collection.rb