Class: Rugular::AppChecker

Inherits:
Object
  • Object
show all
Includes:
Thor::Shell
Defined in:
lib/rugular/tasks/helpers/app_checker.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_name:, root_directory:) ⇒ AppChecker

Returns a new instance of AppChecker.



9
10
11
12
# File 'lib/rugular/tasks/helpers/app_checker.rb', line 9

def initialize(task_name:, root_directory:)
  @task_name = task_name
  @root_directory = root_directory
end

Class Method Details

.check_rugular!(task_name, root_directory) ⇒ Object



5
6
7
# File 'lib/rugular/tasks/helpers/app_checker.rb', line 5

def self.check_rugular!(task_name, root_directory)
  new(task_name: task_name, root_directory: root_directory).check_rugular!
end

Instance Method Details

#check_rugular!Object



14
15
16
# File 'lib/rugular/tasks/helpers/app_checker.rb', line 14

def check_rugular!
  error(rugular_app_message) unless rugular_app?
end