Sha256: fef37221b5efbb67214d492a27c9b4db2ab60ee94bf02f6a1bf48a19aa9dc5d7

Contents?: true

Size: 412 Bytes

Versions: 16

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

class Application
  include Arstotzka

  expose :users, full_path: 'users.first_name',
                 compact: true, cached: true,
                 after: :create_person

  def initialize(json)
    @json = json
  end

  private

  attr_reader :json

  def create_person(names)
    names.map do |name|
      warn "Creating person #{name}"
      Person.new(name)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/support/models/application.rb
arstotzka-1.6.1 spec/support/models/application.rb
arstotzka-1.6.0 spec/support/models/application.rb
arstotzka-1.5.0 spec/support/models/application.rb
arstotzka-1.4.4 spec/support/models/application.rb
arstotzka-1.4.3 spec/support/models/application.rb
arstotzka-1.4.2 spec/support/models/application.rb
arstotzka-1.4.1 spec/support/models/application.rb
arstotzka-1.4.0 spec/support/models/application.rb
arstotzka-1.3.2 spec/support/models/application.rb
arstotzka-1.3.1 spec/support/models/application.rb
arstotzka-1.3.0 spec/support/models/application.rb
arstotzka-1.2.4 spec/support/models/application.rb
arstotzka-1.2.3 spec/support/models/application.rb
arstotzka-1.2.2 spec/support/models/application.rb
arstotzka-1.2.1 spec/support/models/application.rb