Class: ResourcePath
- Inherits:
-
Object
- Object
- ResourcePath
- Defined in:
- lib/http_redirect_test/resource_path.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ ResourcePath
constructor
A new instance of ResourcePath.
- #to_s ⇒ Object
Constructor Details
#initialize(path, options = {}) ⇒ ResourcePath
Returns a new instance of ResourcePath.
4 5 6 7 |
# File 'lib/http_redirect_test/resource_path.rb', line 4 def initialize(path, = {}) @path = path @param = [:param] end |
Instance Attribute Details
#param ⇒ Object
9 10 11 |
# File 'lib/http_redirect_test/resource_path.rb', line 9 def param @param ||= (0...8).map{65.+(rand(25)).chr}.join end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/http_redirect_test/resource_path.rb', line 13 def to_s @path.gsub('*', param) end |