Class: Urgentcare::Office
- Inherits:
-
Object
- Object
- Urgentcare::Office
- Defined in:
- lib/UrgentCare/Office.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#next_available ⇒ Object
Returns the value of attribute next_available.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name = nil, url = nil, next_available = nil, phone_number = nil) ⇒ Office
constructor
A new instance of Office.
Constructor Details
#initialize(name = nil, url = nil, next_available = nil, phone_number = nil) ⇒ Office
Returns a new instance of Office.
7 8 9 10 11 12 13 |
# File 'lib/UrgentCare/Office.rb', line 7 def initialize(name = nil, url = nil, next_available = nil, phone_number = nil) @name = name @url = url @next_available = next_available @phone_number = phone_number self.class.all << self #the class of this instance. abstracted away use of variable. end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/UrgentCare/Office.rb', line 3 def name @name end |
#next_available ⇒ Object
Returns the value of attribute next_available.
3 4 5 |
# File 'lib/UrgentCare/Office.rb', line 3 def next_available @next_available end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/UrgentCare/Office.rb', line 3 def phone_number @phone_number end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/UrgentCare/Office.rb', line 3 def url @url end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'lib/UrgentCare/Office.rb', line 15 def self.all @@all end |