Class: JsonStrategy
- Inherits:
-
Object
- Object
- JsonStrategy
- Defined in:
- lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb
Instance Method Summary collapse
-
#initialize ⇒ JsonStrategy
constructor
A new instance of JsonStrategy.
- #result(evaluation) ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize ⇒ JsonStrategy
Returns a new instance of JsonStrategy.
4 5 6 |
# File 'lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb', line 4 def initialize @strategy = FactoryBot.strategy_by_name(:create).new end |
Instance Method Details
#result(evaluation) ⇒ Object
10 11 12 |
# File 'lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb', line 10 def result(evaluation) @strategy.result(evaluation).to_json end |
#to_sym ⇒ Object
14 15 16 |
# File 'lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb', line 14 def to_sym :json end |