Class: Maseti::Client
- Inherits:
-
Object
- Object
- Maseti::Client
- Includes:
- Constants, FileDownloader, WebPageParser
- Defined in:
- lib/maseti/client.rb
Constant Summary
Constants included from Constants
Maseti::Constants::BASE_URL, Maseti::Constants::COUNTRY_CODE, Maseti::Constants::FILE_TYPE, Maseti::Constants::PAGES, Maseti::Constants::TYPE
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#read_from_save_path ⇒ Object
readonly
Returns the value of attribute read_from_save_path.
-
#save_data ⇒ Object
readonly
Returns the value of attribute save_data.
-
#save_path ⇒ Object
readonly
Returns the value of attribute save_path.
Instance Method Summary collapse
-
#initialize(model: nil, save_data: false, save_path: '', read_from_save_path: false) ⇒ Client
constructor
A new instance of Client.
Methods included from FileDownloader
#compute_hash_of, #download, #download_all_files
Methods included from WebPageParser
#fetch_page, #fetch_xls_paths_from_pages
Constructor Details
#initialize(model: nil, save_data: false, save_path: '', read_from_save_path: false) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 |
# File 'lib/maseti/client.rb', line 9 def initialize(model: nil, save_data: false, save_path: '', read_from_save_path: false) @model = model @save_data = save_data @save_path = save_path @read_from_save_path = read_from_save_path end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
7 8 9 |
# File 'lib/maseti/client.rb', line 7 def model @model end |
#read_from_save_path ⇒ Object (readonly)
Returns the value of attribute read_from_save_path.
7 8 9 |
# File 'lib/maseti/client.rb', line 7 def read_from_save_path @read_from_save_path end |
#save_data ⇒ Object (readonly)
Returns the value of attribute save_data.
7 8 9 |
# File 'lib/maseti/client.rb', line 7 def save_data @save_data end |
#save_path ⇒ Object (readonly)
Returns the value of attribute save_path.
7 8 9 |
# File 'lib/maseti/client.rb', line 7 def save_path @save_path end |