Sha256: 0a6a21ccf59d161c29779227e07076bd7f4ccbb0be06028d8242ad0d8d4cb689

Contents?: true

Size: 280 Bytes

Versions: 31

Compression:

Stored size: 280 Bytes

Contents

module ACTV
  class AssetFactory
    attr_reader :response

    def initialize response_body
      @response = response_body
    end

    def asset
      types = ACTV::Asset.types
      klass = types.find { |type| type.valid? response }
      klass.new response
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
actv-2.10.9 lib/actv/asset_factory.rb
actv-2.10.8 lib/actv/asset_factory.rb
actv-2.10.7 lib/actv/asset_factory.rb
actv-2.10.6 lib/actv/asset_factory.rb
actv-2.10.5 lib/actv/asset_factory.rb
actv-2.10.4 lib/actv/asset_factory.rb
actv-2.10.3 lib/actv/asset_factory.rb
actv-2.10.2 lib/actv/asset_factory.rb
actv-2.10.1 lib/actv/asset_factory.rb
actv-2.10.0 lib/actv/asset_factory.rb
actv-2.9.2 lib/actv/asset_factory.rb
actv-2.9.1 lib/actv/asset_factory.rb
actv-2.9.0 lib/actv/asset_factory.rb
actv-2.8.2 lib/actv/asset_factory.rb
actv-2.8.1 lib/actv/asset_factory.rb
actv-2.7.0 lib/actv/asset_factory.rb
actv-2.6.0 lib/actv/asset_factory.rb
actv-2.5.2 lib/actv/asset_factory.rb
actv-2.5.1 lib/actv/asset_factory.rb
actv-2.5.0 lib/actv/asset_factory.rb