Class: AIRefactor::TemplatedPath

Inherits:
Object
  • Object
show all
Defined in:
lib/ai_refactor/templated_path.rb

Instance Method Summary collapse

Constructor Details

#initialize(input_file, refactor_name, template) ⇒ TemplatedPath

Returns a new instance of TemplatedPath.

Raises:

  • (ArgumentError)


3
4
5
6
7
8
# File 'lib/ai_refactor/templated_path.rb', line 3

def initialize(input_file, refactor_name, template)
  @input_file = input_file
  @refactor_name = refactor_name
  raise ArgumentError unless template.length.positive?
  @template = template
end

Instance Method Details

#generateObject



10
11
12
# File 'lib/ai_refactor/templated_path.rb', line 10

def generate
  path_from_template
end