Sha256: 1d5b3ea8e07f64af4f02d9eaa6fa449b902aa9e24f8deb91d8b2d055fbb6068d

Contents?: true

Size: 303 Bytes

Versions: 6

Compression:

Stored size: 303 Bytes

Contents

# frozen_string_literal: true

class Customer
  attr_reader :name, :age

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

  def adult?
    age >= 18
  end

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

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