Class: LearnTool
- Inherits:
-
Object
- Object
- LearnTool
- Defined in:
- lib/learn-tool.rb,
lib/learn-tool/version.rb
Constant Summary collapse
- VERSION =
"0.0.24"
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 36 37 38 39 40 41 42 |
# File 'lib/learn-tool.rb', line 18 def initialize(mode:, filepath:Dir.pwd) if mode == 'version' puts VERSION return end 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 |