Class: Campus

Inherits:
Object
  • Object
show all
Defined in:
lib/ft_42.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(campus_response) ⇒ Campus

Returns a new instance of Campus.



208
209
210
# File 'lib/ft_42.rb', line 208

def initialize(campus_response)
  @campus = campus_response
end

Instance Attribute Details

#campusObject (readonly)

Returns the value of attribute campus.



206
207
208
# File 'lib/ft_42.rb', line 206

def campus
  @campus
end

Instance Method Details

#idObject



212
213
214
# File 'lib/ft_42.rb', line 212

def id
  campus["id"]
end

#nameObject



216
217
218
# File 'lib/ft_42.rb', line 216

def name
  campus["name"]
end

#student_countObject



220
221
222
# File 'lib/ft_42.rb', line 220

def student_count
  campus["users_count"]
end