Sha256: 4cea3f8738e2287e71b0919038b69eb370632857cf97a3a24028ec402c54aad8

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 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

2 entries across 2 versions & 1 rubygems

Version Path
arstotzka-1.4.2 spec/support/models/employe.rb
arstotzka-1.4.1 spec/support/models/employe.rb