Class: WelltreatStoreFramework::HamlRenderer::UrlJoin

Inherits:
Object
  • Object
show all
Defined in:
lib/welltreat_store_framework/haml_renderer/url_join.rb

Instance Method Summary collapse

Constructor Details

#initialize(*_base_paths) ⇒ UrlJoin

Returns a new instance of UrlJoin.



4
5
6
7
# File 'lib/welltreat_store_framework/haml_renderer/url_join.rb', line 4

def initialize(*_base_paths)
  @paths = []
  join(_base_paths)
end

Instance Method Details

#join(*_paths) ⇒ Object



9
10
11
12
# File 'lib/welltreat_store_framework/haml_renderer/url_join.rb', line 9

def join(*_paths)
  @paths += _paths
  self
end

#to_sObject



14
15
16
# File 'lib/welltreat_store_framework/haml_renderer/url_join.rb', line 14

def to_s
  @paths.join('/')
end