class Person

Attributes

gender[RW]
id[R]
karma[RW]
salary[RW]
title[RW]

Public Class Methods

find(id) click to toggle source
# File activejob/test/models/person.rb, line 10
def self.find(id)
  raise RecordNotFound.new("Cannot find person with ID=404") if id.to_i == 404
  new(id)
end
new(id) click to toggle source
# File activejob/test/models/person.rb, line 15
def initialize(id)
  @id = id
end

Public Instance Methods

==(other_person) click to toggle source
# File activejob/test/models/person.rb, line 19
def ==(other_person)
  other_person.is_a?(Person) && id.to_s == other_person.id.to_s
end
condition_is_true() click to toggle source
# File activemodel/test/models/person.rb, line 9
def condition_is_true
  true
end