Class: BestPracticeProject::HamlLintHandler
Instance Method Summary
collapse
Methods inherited from BaseHandler
#initialize, #rails?
Instance Method Details
#command ⇒ Object
14
15
16
|
# File 'lib/best_practice_project/haml_lint_handler.rb', line 14
def command
@command ||= "bundle exec haml-lint app"
end
|
#execute ⇒ Object
18
19
20
|
# File 'lib/best_practice_project/haml_lint_handler.rb', line 18
def execute
system(command)
end
|
#generate_config ⇒ Object
9
10
11
12
|
# File 'lib/best_practice_project/haml_lint_handler.rb', line 9
def generate_config
puts "HamlLintHandler: Copying standard config"
FileUtils.copy(bpp_config_path, config_path)
end
|
#installed? ⇒ Boolean
2
3
4
5
6
7
|
# File 'lib/best_practice_project/haml_lint_handler.rb', line 2
def installed?
require "haml_lint"
true
rescue LoadError
false
end
|