Sha256: 315751788196d870efca8ec1bae9086703e3d17b6b289abf1631a4c5cf6e8647

Contents?: true

Size: 302 Bytes

Versions: 10

Compression:

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

10 entries across 10 versions & 1 rubygems

Version Path
arstotzka-1.4.2 spec/support/models/customer.rb
arstotzka-1.4.1 spec/support/models/customer.rb
arstotzka-1.4.0 spec/support/models/customer.rb
arstotzka-1.3.2 spec/support/models/customer.rb
arstotzka-1.3.1 spec/support/models/customer.rb
arstotzka-1.3.0 spec/support/models/customer.rb
arstotzka-1.2.4 spec/support/models/customer.rb
arstotzka-1.2.3 spec/support/models/customer.rb
arstotzka-1.2.2 spec/support/models/customer.rb
arstotzka-1.2.1 spec/support/models/customer.rb