Class: Planaria::Generator::Divide::Checker
- Inherits:
-
Object
- Object
- Planaria::Generator::Divide::Checker
- Defined in:
- lib/planaria/generator/divide/checker.rb
Instance Method Summary collapse
- #base_check ⇒ Object
-
#initialize(name, base) ⇒ Checker
constructor
A new instance of Checker.
- #run ⇒ Object
Constructor Details
#initialize(name, base) ⇒ Checker
Returns a new instance of Checker.
7 8 9 10 |
# File 'lib/planaria/generator/divide/checker.rb', line 7 def initialize(name, base) @name = name @base = base end |
Instance Method Details
#base_check ⇒ Object
17 18 19 |
# File 'lib/planaria/generator/divide/checker.rb', line 17 def base_check raise ::Planaria::BaseProjectNotFound unless Dir.exist?("./#{@base}") end |
#run ⇒ Object
12 13 14 15 |
# File 'lib/planaria/generator/divide/checker.rb', line 12 def run base_check check if Dir.exist?("./#{@name}") end |