Class: WelltreatStoreFramework::HamlRenderer::UrlJoin
- Inherits:
-
Object
- Object
- WelltreatStoreFramework::HamlRenderer::UrlJoin
- Defined in:
- lib/welltreat_store_framework/haml_renderer/url_join.rb
Instance Method Summary collapse
-
#initialize(*_base_paths) ⇒ UrlJoin
constructor
A new instance of UrlJoin.
- #join(*_paths) ⇒ Object
- #to_s ⇒ Object
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_s ⇒ Object
14 15 16 |
# File 'lib/welltreat_store_framework/haml_renderer/url_join.rb', line 14 def to_s @paths.join('/') end |