Sha256: e6e9e9150f2eef71edb8ac588a00780f73cecec0b897771bba8d33205ff9a9f4

Contents?: true

Size: 371 Bytes

Versions: 15

Compression:

Stored size: 371 Bytes

Contents

class Person
  class RecordNotFound < StandardError; end

  include GlobalID::Identification

  attr_reader :id

  def self.find(id)
    raise RecordNotFound.new("Cannot find person with ID=404") if id.to_i==404
    new(id)
  end

  def initialize(id)
    @id = id
  end

  def ==(other_person)
    other_person.is_a?(Person) && id.to_s == other_person.id.to_s
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
activejob-retry-0.6.3 test/models/person.rb
activejob-retry-0.6.2 test/models/person.rb
activejob-retry-0.6.1 test/models/person.rb
activejob-retry-0.6.0 test/models/person.rb
activejob-lock-0.0.2 rails/activejob/test/models/person.rb
activejob-retry-0.5.1 test/models/person.rb
activejob-retry-0.5.0 test/models/person.rb
activejob-retry-0.4.2 test/models/person.rb
activejob-retry-0.4.1 test/models/person.rb
activejob-lock-0.0.1 rails/activejob/test/models/person.rb
activejob-retry-0.4.0 test/models/person.rb
activejob-retry-0.3.1 test/models/person.rb
activejob-retry-0.3.0 test/models/person.rb
activejob-retry-0.2.0 test/models/person.rb
activejob-retry-0.1.1 test/models/person.rb