Sha256: 897425de45d08e92399fb19d134611fcdfb62e2cf5ee53ef07dd71673c3c92e3

Contents?: true

Size: 454 Bytes

Versions: 11

Compression:

Stored size: 454 Bytes

Contents

class Person
  attr_accessor :name, :age

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

  def adult?
    @age > 17
  end

  def cool?
    @name.include?('Rob')
  end

  def to_h
    {name: @name, age: @age}
  end
end

people_arrays = [
  ['Robert', 22],
  ['Roberta', 22],
  ['Foo', 42],
  ['Bar', 18]
]

people_objects = [
  Person.new('Robert', 22),
  Person.new('Roberta', 22),
  Person.new('Foo', 42),
  Person.new('Bar', 17),
]

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
qo-0.99.0 .pryrc
qo-0.5.0 .pryrc
qo-0.4.0 .pryrc
qo-0.3.0 .pryrc
qo-0.2.1 .pryrc
qo-0.2.0 .pryrc
qo-0.1.10 .pryrc
qo-0.1.9 .pryrc
qo-0.1.8 .pryrc
qo-0.1.7 .pryrc
qo-0.1.6 .pryrc