Class: BestPracticeProject::RailsBestPracticesHandler
- Inherits:
-
BaseHandler
- Object
- BaseHandler
- BestPracticeProject::RailsBestPracticesHandler
show all
- Defined in:
- lib/best_practice_project/rails_best_practices_handler.rb
Instance Method Summary
collapse
Methods inherited from BaseHandler
#initialize, #rails?
Instance Method Details
#command ⇒ Object
2
3
4
|
# File 'lib/best_practice_project/rails_best_practices_handler.rb', line 2
def command
"bundle exec rails_best_practices"
end
|
#execute ⇒ Object
10
11
12
|
# File 'lib/best_practice_project/rails_best_practices_handler.rb', line 10
def execute
system(command)
end
|
#generate_config ⇒ Object
6
7
8
|
# File 'lib/best_practice_project/rails_best_practices_handler.rb', line 6
def generate_config
system("bundle exec rails_best_practices -g")
end
|
#installed? ⇒ Boolean
14
15
16
17
18
19
20
21
|
# File 'lib/best_practice_project/rails_best_practices_handler.rb', line 14
def installed?
return false unless rails?
require "rails_best_practices"
true
rescue LoadError
false
end
|