Class: LocalLibrary::Library
- Inherits:
-
Object
- Object
- LocalLibrary::Library
- Defined in:
- lib/local_library/library.rb
Constant Summary collapse
- @@libraries =
[]
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(branch) ⇒ Library
constructor
A new instance of Library.
Constructor Details
#initialize(branch) ⇒ Library
Returns a new instance of Library.
7 8 9 |
# File 'lib/local_library/library.rb', line 7 def initialize(branch) @branch = branch end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
2 3 4 |
# File 'lib/local_library/library.rb', line 2 def address @address end |
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
3 4 5 |
# File 'lib/local_library/library.rb', line 3 def branch @branch end |
#phone ⇒ Object
Returns the value of attribute phone.
2 3 4 |
# File 'lib/local_library/library.rb', line 2 def phone @phone end |
#status ⇒ Object
Returns the value of attribute status.
2 3 4 |
# File 'lib/local_library/library.rb', line 2 def status @status end |
Class Method Details
.array_length ⇒ Object
15 16 17 |
# File 'lib/local_library/library.rb', line 15 def self.array_length self.libraries.length end |
.clear ⇒ Object
19 20 21 |
# File 'lib/local_library/library.rb', line 19 def self.clear self.libraries.clear end |
.libraries ⇒ Object
11 12 13 |
# File 'lib/local_library/library.rb', line 11 def self.libraries @@libraries end |