Class: Recode::Runner

Inherits:
Object
  • Object
show all
Includes:
Colsole, ChangeVariations
Defined in:
lib/recode/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ChangeVariations

#change_variations

Constructor Details

#initialize(path: nil, extensions: nil, old_string: nil, new_string: nil) ⇒ Runner

Returns a new instance of Runner.



8
9
10
11
12
13
# File 'lib/recode/runner.rb', line 8

def initialize(path: nil, extensions: nil, old_string: nil, new_string: nil)
  @path = path
  @extensions = extensions
  @old_string = old_string
  @new_string = new_string
end

Instance Attribute Details

#extensionsObject

Returns the value of attribute extensions.



6
7
8
# File 'lib/recode/runner.rb', line 6

def extensions
  @extensions
end

#handlerObject

Returns the value of attribute handler.



6
7
8
# File 'lib/recode/runner.rb', line 6

def handler
  @handler
end

#new_stringObject

Returns the value of attribute new_string.



6
7
8
# File 'lib/recode/runner.rb', line 6

def new_string
  @new_string
end

#old_stringObject

Returns the value of attribute old_string.



6
7
8
# File 'lib/recode/runner.rb', line 6

def old_string
  @old_string
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/recode/runner.rb', line 6

def path
  @path
end

Instance Method Details

#execute(handler) ⇒ Object



15
16
17
18
19
# File 'lib/recode/runner.rb', line 15

def execute(handler)
  @handler = handler
  refactor_filenames
  refactor_contents
end