Class: SimpleRouter::Engines::SimpleEngine::Path
- Inherits:
-
Object
- Object
- SimpleRouter::Engines::SimpleEngine::Path
- Defined in:
- lib/simple_router/engines/simple_engine.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#parts ⇒ Object
Returns the value of attribute parts.
Instance Method Summary collapse
-
#initialize(path) ⇒ Path
constructor
A new instance of Path.
- #to_s ⇒ Object
Constructor Details
#initialize(path) ⇒ Path
Returns a new instance of Path.
46 47 48 |
# File 'lib/simple_router/engines/simple_engine.rb', line 46 def initialize(path) self.parts, self.ext = split_path(path) end |
Instance Attribute Details
#ext ⇒ Object
Returns the value of attribute ext.
44 45 46 |
# File 'lib/simple_router/engines/simple_engine.rb', line 44 def ext @ext end |
#parts ⇒ Object
Returns the value of attribute parts.
44 45 46 |
# File 'lib/simple_router/engines/simple_engine.rb', line 44 def parts @parts end |
Instance Method Details
#to_s ⇒ Object
50 51 52 |
# File 'lib/simple_router/engines/simple_engine.rb', line 50 def to_s '/' + self.parts.join('/') + self.ext end |