class BestPracticeProject::HamlLintHandler

Public Instance Methods

command() click to toggle source
# File lib/best_practice_project/haml_lint_handler.rb, line 14
def command
  @command ||= "bundle exec haml-lint app"
end
execute() click to toggle source
# File lib/best_practice_project/haml_lint_handler.rb, line 18
def execute
  system(command)
end
generate_config() click to toggle source
# 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?() click to toggle source
# File lib/best_practice_project/haml_lint_handler.rb, line 2
def installed?
  require "haml_lint"
  true
rescue LoadError
  false
end

Private Instance Methods

bpp_config_path() click to toggle source
# File lib/best_practice_project/haml_lint_handler.rb, line 24
def bpp_config_path
  @bpp_config_path ||= File.realpath("#{File.dirname(__FILE__)}/config/haml-lint.yml")
end
config_path() click to toggle source
# File lib/best_practice_project/haml_lint_handler.rb, line 28
def config_path
  @config_path ||= Rails.root.join(".haml-lint.yml").to_s
end