Class: ResourcePath
- Inherits:
-
Object
- Object
- ResourcePath
- Defined in:
- lib/traffic_cop/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.
5 6 7 8 |
# File 'lib/traffic_cop/resource_path.rb', line 5 def initialize(path, = {}) @path = path @param = [:param] end |
Instance Attribute Details
#param ⇒ Object
10 11 12 |
# File 'lib/traffic_cop/resource_path.rb', line 10 def param @param ||= (0...8).map{65.+(rand(25)).chr}.join end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/traffic_cop/resource_path.rb', line 14 def to_s @path.gsub('*', param) end |