svmartin
12/4/2016 - 10:01 PM

public_protected_private.rb

class Gym
  @gyms = []
  
  def initialize(name, city, neighborhood='')
    @name = name
    @city = city
    @neighborhood = neighborhood
    @number_of_gyms = 1
    @members = 0
    @gyms << [name, city, neighborhood]
  end
  
  def add_members
    @members += 1
  end
  
  def about
    puts "We are Mega Gym."
    puts "We currently have #{gym_count}."
  end

  def compare_members(other)
    #
  end
  
  private
  def gym_count
    @number_of_gyms
  end
end # class end