Class: SimpleRouter::Engines::SimpleEngine::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_router/engines/simple_engine.rb

Overview

:nodoc:

Direct Known Subclasses

Pattern

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#extObject

Returns the value of attribute ext.



44
45
46
# File 'lib/simple_router/engines/simple_engine.rb', line 44

def ext
  @ext
end

#partsObject

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_sObject



50
51
52
# File 'lib/simple_router/engines/simple_engine.rb', line 50

def to_s
  '/' + self.parts.join('/') + self.ext
end