Class: Edgar::Address
- Inherits:
-
Object
- Object
- Edgar::Address
- Defined in:
- lib/edgar/entity_data.rb
Overview
Mailing or business address parsed from SEC entity data.
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#state_or_country ⇒ Object
readonly
Returns the value of attribute state_or_country.
-
#state_or_country_desc ⇒ Object
readonly
Returns the value of attribute state_or_country_desc.
-
#street1 ⇒ Object
readonly
Returns the value of attribute street1.
-
#street2 ⇒ Object
readonly
Returns the value of attribute street2.
-
#zipcode ⇒ Object
readonly
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#initialize(data) ⇒ Address
constructor
A new instance of Address.
- #to_s ⇒ Object
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
#city ⇒ Object (readonly)
Returns the value of attribute city.
173 174 175 |
# File 'lib/edgar/entity_data.rb', line 173 def city @city end |
#state_or_country ⇒ Object (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_desc ⇒ Object (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 |
#street1 ⇒ Object (readonly)
Returns the value of attribute street1.
173 174 175 |
# File 'lib/edgar/entity_data.rb', line 173 def street1 @street1 end |
#street2 ⇒ Object (readonly)
Returns the value of attribute street2.
173 174 175 |
# File 'lib/edgar/entity_data.rb', line 173 def street2 @street2 end |
#zipcode ⇒ Object (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_s ⇒ Object
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 |