Class: MyRepresentatives::Commonwealth::CSVEmail
- Inherits:
-
Object
- Object
- MyRepresentatives::Commonwealth::CSVEmail
- Includes:
- Abbreviatable, Fileable, Guessable
- Defined in:
- lib/my_representatives/commonwealth/csv_email.rb
Instance Attribute Summary collapse
-
#csv_filename ⇒ Object
Returns the value of attribute csv_filename.
-
#csv_url ⇒ Object
Returns the value of attribute csv_url.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#people ⇒ Object
Returns the value of attribute people.
Instance Method Summary collapse
-
#initialize ⇒ CSVEmail
constructor
A new instance of CSVEmail.
Methods included from Guessable
#guess_first, #guess_gender, #guess_last, #guess_preferred, #guess_title
Methods included from Fileable
Methods included from Abbreviatable
Constructor Details
#initialize ⇒ CSVEmail
Returns a new instance of CSVEmail.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/my_representatives/commonwealth/csv_email.rb', line 10 def initialize @logger = Logger.new(STDOUT) # Email addresses for Commonwealth Members and Senators tend to be a little harder to find # At this time, this gem uses a csv manually created by https://github.com/tennantje/. # https://gist.github.com/tennantje/8ee584d9c534ce6a57910668b277394d @csv_url = "https://gist.githubusercontent.com/tennantje/8ee584d9c534ce6a57910668b277394d/raw" @csv_filename = "tmp/csv_commonwealth_emails.csv" @people = [] csv_from_url people_from_csv end |
Instance Attribute Details
#csv_filename ⇒ Object
Returns the value of attribute csv_filename.
8 9 10 |
# File 'lib/my_representatives/commonwealth/csv_email.rb', line 8 def csv_filename @csv_filename end |
#csv_url ⇒ Object
Returns the value of attribute csv_url.
8 9 10 |
# File 'lib/my_representatives/commonwealth/csv_email.rb', line 8 def csv_url @csv_url end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/my_representatives/commonwealth/csv_email.rb', line 8 def logger @logger end |
#people ⇒ Object
Returns the value of attribute people.
8 9 10 |
# File 'lib/my_representatives/commonwealth/csv_email.rb', line 8 def people @people end |