Class: BaseRepository
- Inherits:
-
Object
- Object
- BaseRepository
- Defined in:
- lib/covid19/lib/repositories/virus_tracker/base_repository.rb
Direct Known Subclasses
Constant Summary collapse
- GLOBAL_STATS_URL =
'https://thevirustracker.com/'- DEFAULT_RESOURCE =
'free-api'
Instance Attribute Summary collapse
-
#query_validator ⇒ Object
readonly
Returns the value of attribute query_validator.
Instance Method Summary collapse
- #by_country(country:) ⇒ Object
- #global ⇒ Object
-
#initialize ⇒ BaseRepository
constructor
A new instance of BaseRepository.
Constructor Details
#initialize ⇒ BaseRepository
Returns a new instance of BaseRepository.
9 10 11 |
# File 'lib/covid19/lib/repositories/virus_tracker/base_repository.rb', line 9 def initialize @query_validator = Validators::QueryValidator.new end |
Instance Attribute Details
#query_validator ⇒ Object (readonly)
Returns the value of attribute query_validator.
7 8 9 |
# File 'lib/covid19/lib/repositories/virus_tracker/base_repository.rb', line 7 def query_validator @query_validator end |
Instance Method Details
#by_country(country:) ⇒ Object
17 18 19 |
# File 'lib/covid19/lib/repositories/virus_tracker/base_repository.rb', line 17 def by_country(country:) raise 'NotImplementedError::by_country' end |
#global ⇒ Object
13 14 15 |
# File 'lib/covid19/lib/repositories/virus_tracker/base_repository.rb', line 13 def global raise 'NotImplementedError::global' end |