Class: Campus
- Inherits:
-
Object
- Object
- Campus
- Defined in:
- lib/ft_42.rb
Instance Attribute Summary collapse
-
#campus ⇒ Object
readonly
Returns the value of attribute campus.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(campus_response) ⇒ Campus
constructor
A new instance of Campus.
- #name ⇒ Object
- #student_count ⇒ Object
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
#campus ⇒ Object (readonly)
Returns the value of attribute campus.
206 207 208 |
# File 'lib/ft_42.rb', line 206 def campus @campus end |
Instance Method Details
#id ⇒ Object
212 213 214 |
# File 'lib/ft_42.rb', line 212 def id campus["id"] end |
#name ⇒ Object
216 217 218 |
# File 'lib/ft_42.rb', line 216 def name campus["name"] end |
#student_count ⇒ Object
220 221 222 |
# File 'lib/ft_42.rb', line 220 def student_count campus["users_count"] end |