Class: LearnTool
- Inherits:
-
Object
- Object
- LearnTool
- Defined in:
- lib/learn-tool.rb
Instance Method Summary collapse
-
#initialize(mode:, filepath: Dir.pwd) ⇒ LearnTool
constructor
A new instance of LearnTool.
Constructor Details
#initialize(mode:, filepath: Dir.pwd) ⇒ LearnTool
Returns a new instance of LearnTool.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/learn-tool.rb', line 18 def initialize(mode:, filepath:Dir.pwd) puts "Learn-tool will #{mode} at the following location: #{filepath}" if mode == 'create' LearnCreate.new(filepath) end if mode == 'duplicate' LearnDuplicate.new(filepath) end if mode == 'repair' LearnRepair.new(filepath) end if mode == 'lint' LearnLinter.new(filepath).lint_directory end end |