Sha256: b81e1e8046299d2b1bd1e7fdecf42d466f295a2d61f2055009deee16f34040c0

Contents?: true

Size: 308 Bytes

Versions: 9

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

class DHC::Response::Data::Collection < Array
  include DHC::Response::Data::Base

  def initialize(response, data: nil)
    @response = response
    @data = data

    super(
      as_json.map do |i|
        DHC::Response::Data.new(response, data: i)
      end
    )
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dhc-2.4.0 lib/dhc/response/data/collection.rb
dhc-2.3.0 lib/dhc/response/data/collection.rb
dhc-2.2.1 lib/dhc/response/data/collection.rb
dhc-2.2.0 lib/dhc/response/data/collection.rb
dhc-2.1.1 lib/dhc/response/data/collection.rb
dhc-2.1.0 lib/dhc/response/data/collection.rb
dhc-2.0.1 lib/dhc/response/data/collection.rb
dhc-2.0.0 lib/dhc/response/data/collection.rb
dhc-1.0.0 lib/dhc/response/data/collection.rb