Class: PHLCovidTesting::TestingLocation
- Inherits:
-
Object
- Object
- PHLCovidTesting::TestingLocation
- Defined in:
- lib/phl_covid_testing/testing_location.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#access_type ⇒ Object
Returns the value of attribute access_type.
-
#address ⇒ Object
Returns the value of attribute address.
-
#facility_type ⇒ Object
Returns the value of attribute facility_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#referral ⇒ Object
Returns the value of attribute referral.
-
#street ⇒ Object
Returns the value of attribute street.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ TestingLocation
constructor
A new instance of TestingLocation.
Methods included from Inputable::InstanceMethods
#get_input_all, #get_input_main, #get_input_main_options, #get_input_sub
Methods included from Displayable::InstanceMethods
Methods included from Findable::InstanceMethods
#search_by_access, #search_by_name, #search_by_name_or_zipcode, #search_by_zipcode
Constructor Details
#initialize(hash) ⇒ TestingLocation
Returns a new instance of TestingLocation.
10 11 12 13 14 15 |
# File 'lib/phl_covid_testing/testing_location.rb', line 10 def initialize(hash) hash.each do |k, v| self.send(("#{k}="), v) end @@all << self end |
Instance Attribute Details
#access_type ⇒ Object
Returns the value of attribute access_type.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def access_type @access_type end |
#address ⇒ Object
Returns the value of attribute address.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def address @address end |
#facility_type ⇒ Object
Returns the value of attribute facility_type.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def facility_type @facility_type end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def phone @phone end |
#referral ⇒ Object
Returns the value of attribute referral.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def referral @referral end |
#street ⇒ Object
Returns the value of attribute street.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def street @street end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
2 3 4 |
# File 'lib/phl_covid_testing/testing_location.rb', line 2 def zipcode @zipcode end |
Class Method Details
.all ⇒ Object
23 24 25 |
# File 'lib/phl_covid_testing/testing_location.rb', line 23 def self.all @@all end |
.create_from_collection(array) ⇒ Object
17 18 19 20 21 |
# File 'lib/phl_covid_testing/testing_location.rb', line 17 def self.create_from_collection(array) array.each do |hash| PHLCovidTesting::TestingLocation.new(hash) end end |