class GreenButtonData::Parser::MainAddress
Public Instance Methods
address_general()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 24 def address_general return street_detail.address_general if street_detail.address_general street_detail.number + ' ' + street_detail.name end
state()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 14 def state town_detail.state_or_province end
to_s()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 30 def to_s address_general + ',' + town_detail_info end
town()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 10 def town town_detail.name end
town_detail_info()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 6 def town_detail_info [town, state, zipcode].join(',') end
zipcode()
click to toggle source
# File lib/green-button-data/parser/main_address.rb, line 18 def zipcode return town_detail.code.gsub(/\s+/, "") if town_detail.code postal_code end