Class: Edgar::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/edgar/entity_data.rb

Overview

Mailing or business address parsed from SEC entity data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Address

Returns a new instance of Address.



175
176
177
178
179
180
181
182
# File 'lib/edgar/entity_data.rb', line 175

def initialize(data)
  @street1 = data["street1"]
  @street2 = data["street2"]
  @city = data["city"]
  @state_or_country = data["stateOrCountry"]
  @zipcode = data["zipCode"]
  @state_or_country_desc = data["stateOrCountryDescription"]
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def city
  @city
end

#state_or_countryObject (readonly)

Returns the value of attribute state_or_country.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def state_or_country
  @state_or_country
end

#state_or_country_descObject (readonly)

Returns the value of attribute state_or_country_desc.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def state_or_country_desc
  @state_or_country_desc
end

#street1Object (readonly)

Returns the value of attribute street1.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def street1
  @street1
end

#street2Object (readonly)

Returns the value of attribute street2.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def street2
  @street2
end

#zipcodeObject (readonly)

Returns the value of attribute zipcode.



173
174
175
# File 'lib/edgar/entity_data.rb', line 173

def zipcode
  @zipcode
end

Instance Method Details

#to_sObject



184
185
186
187
# File 'lib/edgar/entity_data.rb', line 184

def to_s
  parts = [@street1, @street2, @city, @state_or_country, @zipcode].compact
  parts.join(", ")
end