Class: Relocator::Path::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/relocator/path/formatter.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#callObject



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