Class: Path
- Inherits:
-
Object
- Object
- Path
- Defined in:
- lib/polygon/core_ext/path.rb
Instance Method Summary collapse
Instance Method Details
#to_url ⇒ Object
17 18 19 20 21 22 |
# File 'lib/polygon/core_ext/path.rb', line 17 def to_url path = self.rm_ext path = path.dir if path.basename.to_s == 'index' path = path == Path('.') ? Path("") : path path.to_s end |