spec/support/models/collector.rb in arstotzka-1.0.4 vs spec/support/models/collector.rb in arstotzka-1.1.0
- old
+ new
@@ -1,7 +1,9 @@
# frozen_string_literal: true
+require_relative './collector/game'
+
class Collector
include Arstotzka
MALE = 'male'
FEMALE = 'female'
@@ -12,10 +14,10 @@
expose :gender, path: :person, type: :gender, cached: true, json: :hash
expose :car_names, flatten: true, compact: false, json: :hash,
default: 'MissingName',
full_path: 'collections.cars.units.nick_name'
expose :finished_games, json: :hash,
- flatten: true, class: Collector::Game,
+ flatten: true, klass: Collector::Game,
after: :filter_finished, compact: true,
full_path: 'collections.games.titles'
def initialize(hash = {})
@hash = hash