Class: MyRepresentatives::ACT::CSVLower

Inherits:
Object
  • Object
show all
Includes:
Fileable, Guessable
Defined in:
lib/my_representatives/act/csv_lower.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Guessable

#guess_first, #guess_gender, #guess_last, #guess_preferred, #guess_title

Methods included from Fileable

#create_tmp

Constructor Details

#initializeCSVLower

Returns a new instance of CSVLower.



9
10
11
12
13
14
15
16
17
# File 'lib/my_representatives/act/csv_lower.rb', line 9

def initialize
  @logger = Logger.new(STDOUT)
  @csv_url = "https://www.parliament.act.gov.au/__data/assets/file/0011/874235/Members-mail-merge-list-2016-1108.csv"
  @csv_filename = "tmp/csv_act_lower.csv"
  @people = []

  csv_from_url
  people_from_csv
end

Instance Attribute Details

#csv_filenameObject

Returns the value of attribute csv_filename.



7
8
9
# File 'lib/my_representatives/act/csv_lower.rb', line 7

def csv_filename
  @csv_filename
end

#csv_urlObject

Returns the value of attribute csv_url.



7
8
9
# File 'lib/my_representatives/act/csv_lower.rb', line 7

def csv_url
  @csv_url
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/my_representatives/act/csv_lower.rb', line 7

def logger
  @logger
end

#peopleObject

Returns the value of attribute people.



7
8
9
# File 'lib/my_representatives/act/csv_lower.rb', line 7

def people
  @people
end