Sha256: b80f619ccd4e106dc799398667623398eb3dcbcbb98f3b31b1dadd685fc70b5a

Contents?: true

Size: 379 Bytes

Versions: 6

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true

class Employe
  attr_reader :name, :age, :company

  def initialize(name:, age:, company:)
    @name    = name
    @age     = age
    @company = company
  end

  def adult?
    age >= 18
  end

  def ==(other)
    return unless other.class == self.class

    other.name == name &&
      other.age == age &&
      other.company == company
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/support/models/employe.rb
arstotzka-1.6.1 spec/support/models/employe.rb
arstotzka-1.6.0 spec/support/models/employe.rb
arstotzka-1.5.0 spec/support/models/employe.rb
arstotzka-1.4.4 spec/support/models/employe.rb
arstotzka-1.4.3 spec/support/models/employe.rb