Sha256: be5791df7c8364f1184c4172ce802c5d2fb71b8678509b2a04db202ac1a295e4

Contents?: true

Size: 278 Bytes

Versions: 10

Compression:

Stored size: 278 Bytes

Contents

# frozen_string_literal: true

class JsonStrategy
  def initialize
    @strategy = FactoryBot.strategy_by_name(:create).new
  end

  delegate :association, to: :@strategy

  def result(evaluation)
    @strategy.result(evaluation).to_json
  end

  def to_sym
    :json
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hyrax-5.0.1 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-5.0.0 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-5.0.0.rc3 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-5.0.0.rc2 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-5.0.0.rc1 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-4.0.0 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-4.0.0.rc3 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-4.0.0.rc2 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-4.0.0.rc1 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
hyrax-4.0.0.beta2 lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb