Class: AtlasEngine::Street

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/models/atlas_engine/street.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#streetObject (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

#nameObject



16
17
18
# File 'app/models/atlas_engine/street.rb', line 16

def name
  parsing[:name]
end

#with_stripped_nameObject



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