Class: Recode::Runner
- Inherits:
-
Object
- Object
- Recode::Runner
- Includes:
- Colsole, ChangeVariations
- Defined in:
- lib/recode/runner.rb
Instance Attribute Summary collapse
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#handler ⇒ Object
Returns the value of attribute handler.
-
#new_string ⇒ Object
Returns the value of attribute new_string.
-
#old_string ⇒ Object
Returns the value of attribute old_string.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #execute(handler) ⇒ Object
-
#initialize(path: nil, extensions: nil, old_string: nil, new_string: nil) ⇒ Runner
constructor
A new instance of Runner.
Methods included from ChangeVariations
Constructor Details
#initialize(path: nil, extensions: nil, old_string: nil, new_string: nil) ⇒ Runner
Returns a new instance of Runner.
9 10 11 12 |
# File 'lib/recode/runner.rb', line 9 def initialize(path: nil, extensions: nil, old_string: nil, new_string: nil) @path, @extensions = path, extensions @old_string, @new_string = old_string, new_string end |
Instance Attribute Details
#extensions ⇒ Object
Returns the value of attribute extensions.
6 7 8 |
# File 'lib/recode/runner.rb', line 6 def extensions @extensions end |
#handler ⇒ Object
Returns the value of attribute handler.
7 8 9 |
# File 'lib/recode/runner.rb', line 7 def handler @handler end |
#new_string ⇒ Object
Returns the value of attribute new_string.
6 7 8 |
# File 'lib/recode/runner.rb', line 6 def new_string @new_string end |
#old_string ⇒ Object
Returns the value of attribute old_string.
6 7 8 |
# File 'lib/recode/runner.rb', line 6 def old_string @old_string end |
#path ⇒ Object
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
14 15 16 17 18 |
# File 'lib/recode/runner.rb', line 14 def execute(handler) @handler = handler refactor_filenames refactor_contents end |