Class: Relocator::Path::Spec
- Inherits:
-
Object
- Object
- Relocator::Path::Spec
- Defined in:
- lib/relocator/path/spec.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(string) ⇒ Spec
constructor
A new instance of Spec.
Constructor Details
#initialize(string) ⇒ Spec
Returns a new instance of Spec.
6 7 8 |
# File 'lib/relocator/path/spec.rb', line 6 def initialize(string) self.string = string end |
Class Method Details
.call(*args) ⇒ Object
2 3 4 |
# File 'lib/relocator/path/spec.rb', line 2 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'lib/relocator/path/spec.rb', line 10 def call string .split("/") .yield_self(&replace) .join("/") end |