Class: Shortenizer::MountPoint
- Inherits:
-
Object
- Object
- Shortenizer::MountPoint
- Defined in:
- lib/shortenizer/mount_point.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #at_root? ⇒ Boolean
-
#initialize ⇒ MountPoint
constructor
A new instance of MountPoint.
Constructor Details
#initialize ⇒ MountPoint
Returns a new instance of MountPoint.
5 6 7 |
# File 'lib/shortenizer/mount_point.rb', line 5 def initialize @location = Rails.application.routes.routes.select {|r| r.name == 'shortenizer' }.first.path.spec.to_s end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/shortenizer/mount_point.rb', line 3 def location @location end |
Instance Method Details
#at_root? ⇒ Boolean
9 10 11 |
# File 'lib/shortenizer/mount_point.rb', line 9 def at_root? @location == '/' end |