Sha256: adffc7fb1b16096d63068192bb47a827b1d29a92086f4f20a4097987d1779912

Contents?: true

Size: 296 Bytes

Versions: 7

Compression:

Stored size: 296 Bytes

Contents

# frozen_string_literal: true

module Omdb
  module Api
    class Collection
      include Enumerable
      attr_accessor :movies

      def initialize(movies)
        self.movies = Array.new(movies)
      end

      def each
        movies.each { |item| yield item }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
omdb-api-1.4.3 lib/omdb/api/collection.rb
omdb-api-1.4.2 lib/omdb/api/collection.rb
omdb-api-1.4.1 lib/omdb/api/collection.rb
omdb-api-1.4.0 lib/omdb/api/collection.rb
omdb-api-1.3.0 lib/omdb/api/collection.rb
omdb-api-1.2.0 lib/omdb/api/collection.rb
omdb-api-1.0.0 lib/omdb/api/collection.rb