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