Class: DataFetcher
- Inherits:
-
Object
- Object
- DataFetcher
- Defined in:
- lib/common_tools/data_fetcher.rb
Instance Attribute Summary collapse
-
#batch_id ⇒ Object
Returns the value of attribute batch_id.
-
#client ⇒ Object
Returns the value of attribute client.
-
#keys ⇒ Object
Returns the value of attribute keys.
Instance Method Summary collapse
- #get_roster ⇒ Object
-
#initialize(batch_id = nil) ⇒ DataFetcher
constructor
A new instance of DataFetcher.
- #parse_roster ⇒ Object
Constructor Details
#initialize(batch_id = nil) ⇒ DataFetcher
Returns a new instance of DataFetcher.
5 6 7 |
# File 'lib/common_tools/data_fetcher.rb', line 5 def initialize(batch_id=nil) @batch_id = batch_id end |
Instance Attribute Details
#batch_id ⇒ Object
Returns the value of attribute batch_id.
3 4 5 |
# File 'lib/common_tools/data_fetcher.rb', line 3 def batch_id @batch_id end |
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/common_tools/data_fetcher.rb', line 3 def client @client end |
#keys ⇒ Object
Returns the value of attribute keys.
3 4 5 |
# File 'lib/common_tools/data_fetcher.rb', line 3 def keys @keys end |
Instance Method Details
#get_roster ⇒ Object
15 16 17 18 19 |
# File 'lib/common_tools/data_fetcher.rb', line 15 def get_roster configure_keys configure_credentials @client.csv_for(self.batch_id) end |
#parse_roster ⇒ Object
9 10 11 12 |
# File 'lib/common_tools/data_fetcher.rb', line 9 def parse_roster roster = get_roster Parser.parse_roster(roster) end |