Class: Relocator::Path::Formatter
- Inherits:
-
Object
- Object
- Relocator::Path::Formatter
- Defined in:
- lib/relocator/path/formatter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(output, filename) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(output, filename) ⇒ Formatter
6 7 8 9 |
# File 'lib/relocator/path/formatter.rb', line 6 def initialize(output, filename) self.output = output self.filename = filename end |
Class Method Details
.call(*args) ⇒ Object
2 3 4 |
# File 'lib/relocator/path/formatter.rb', line 2 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/relocator/path/formatter.rb', line 11 def call Pathname .new("") .join(*parts, output_underscore) .sub_ext(".rb") .to_s end |