Class: AtlasEngine::Street
- Inherits:
-
Object
- Object
- AtlasEngine::Street
- Extended by:
- T::Sig
- Defined in:
- app/models/atlas_engine/street.rb
Instance Attribute Summary collapse
-
#street ⇒ Object
readonly
Returns the value of attribute street.
Instance Method Summary collapse
-
#initialize(street:) ⇒ Street
constructor
A new instance of Street.
- #name ⇒ Object
- #with_stripped_name ⇒ Object
Constructor Details
#initialize(street:) ⇒ Street
Returns a new instance of Street.
11 12 13 |
# File 'app/models/atlas_engine/street.rb', line 11 def initialize(street:) @street = street end |
Instance Attribute Details
#street ⇒ Object (readonly)
Returns the value of attribute street.
8 9 10 |
# File 'app/models/atlas_engine/street.rb', line 8 def street @street end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'app/models/atlas_engine/street.rb', line 16 def name parsing[:name] end |
#with_stripped_name ⇒ Object
21 22 23 24 25 |
# File 'app/models/atlas_engine/street.rb', line 21 def with_stripped_name return street if name.blank? street.sub(name, T.must(name).gsub(/\s+/, "")) end |