Class: MyRepresentatives::Commonwealth::CSVUpper

Inherits:
Object
  • Object
show all
Includes:
Abbreviatable, Fileable, Guessable
Defined in:
lib/my_representatives/commonwealth/csv_upper.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

Methods included from Abbreviatable

#state_abbreviation

Constructor Details

#initializeCSVUpper

Returns a new instance of CSVUpper.



10
11
12
13
14
15
16
17
18
# File 'lib/my_representatives/commonwealth/csv_upper.rb', line 10

def initialize
  @logger       = Logger.new(STDOUT)
  @csv_url      = "http://www.aph.gov.au/~/media/03%20Senators%20and%20Members/Address%20Labels%20and%20CSV%20files/allsenel.csv?la=en"
  @csv_filename = "tmp/csv_commonwealth_upper.csv"
  @people       = []

  csv_from_url
  people_from_csv
end

Instance Attribute Details

#csv_filenameObject

Returns the value of attribute csv_filename.



8
9
10
# File 'lib/my_representatives/commonwealth/csv_upper.rb', line 8

def csv_filename
  @csv_filename
end

#csv_urlObject

Returns the value of attribute csv_url.



8
9
10
# File 'lib/my_representatives/commonwealth/csv_upper.rb', line 8

def csv_url
  @csv_url
end

#loggerObject

Returns the value of attribute logger.



8
9
10
# File 'lib/my_representatives/commonwealth/csv_upper.rb', line 8

def logger
  @logger
end

#peopleObject

Returns the value of attribute people.



8
9
10
# File 'lib/my_representatives/commonwealth/csv_upper.rb', line 8

def people
  @people
end