Class: Planaria::Generator::Divide::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/planaria/generator/divide/checker.rb

Instance Method Summary collapse

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_checkObject



17
18
19
# File 'lib/planaria/generator/divide/checker.rb', line 17

def base_check
  raise ::Planaria::BaseProjectNotFound unless Dir.exist?("./#{@base}")
end

#runObject



12
13
14
15
# File 'lib/planaria/generator/divide/checker.rb', line 12

def run
  base_check
  check if Dir.exist?("./#{@name}")
end