Class: Namespaces::RandomizedSuffixPath
- Inherits:
-
Object
- Object
- Namespaces::RandomizedSuffixPath
- Defined in:
- app/models/namespaces/randomized_suffix_path.rb
Constant Summary collapse
- MAX_TRIES =
4
- LEADING_ZEROS =
/^0+/
Instance Method Summary collapse
- #call(new_count) ⇒ Object
-
#initialize(path) ⇒ RandomizedSuffixPath
constructor
A new instance of RandomizedSuffixPath.
- #to_s ⇒ Object
Constructor Details
#initialize(path) ⇒ RandomizedSuffixPath
Returns a new instance of RandomizedSuffixPath.
8 9 10 |
# File 'app/models/namespaces/randomized_suffix_path.rb', line 8 def initialize(path) @path = path end |
Instance Method Details
#call(new_count) ⇒ Object
12 13 14 15 |
# File 'app/models/namespaces/randomized_suffix_path.rb', line 12 def call(new_count) @count = new_count.to_i to_s end |
#to_s ⇒ Object
17 18 19 |
# File 'app/models/namespaces/randomized_suffix_path.rb', line 17 def to_s "#{path}#{suffix}" end |