class UqLibraries::LibraryDetails
Attributes
available[R]
level[R]
out_of_available[R]
Public Class Methods
all()
click to toggle source
# File lib/uq_libraries/library_details.rb, line 17 def self.all # Getter method for @@all array. Returns all LibraryDetails instances @@all end
create_from_collection(details_array)
click to toggle source
# File lib/uq_libraries/library_details.rb, line 13 def self.create_from_collection(details_array) # Creates library_details instance from array of hashes returned by Scraper#scrape_details_page details_array.each {|details_hash| self.new(details_hash)} end
new(details_hash)
click to toggle source
# File lib/uq_libraries/library_details.rb, line 5 def initialize(details_hash) @level = details_hash[:level] @available = details_hash[:available] @out_of_available = details_hash[:out_of_available] @@all << self end