Class: Checker::Options
- Inherits:
-
Object
- Object
- Checker::Options
- Defined in:
- lib/checker/options.rb
Class Method Summary collapse
- .get_config(conf, default = nil) ⇒ Object
- .modules_to_check ⇒ Object
- .prevent_commit_on_warning ⇒ Object
- .use_rails_for_sass ⇒ Object
Class Method Details
.get_config(conf, default = nil) ⇒ Object
4 5 6 7 |
# File 'lib/checker/options.rb', line 4 def get_config(conf, default = nil) config = `git config checker.#{conf}`.chomp (config.empty? && !default.nil?) ? default : config end |
.modules_to_check ⇒ Object
9 10 11 |
# File 'lib/checker/options.rb', line 9 def modules_to_check get_config("check", "all").split(",").map(&:strip) end |
.prevent_commit_on_warning ⇒ Object
13 14 15 |
# File 'lib/checker/options.rb', line 13 def prevent_commit_on_warning get_config("commit-on-warning", "true") == "false" end |
.use_rails_for_sass ⇒ Object
17 18 19 |
# File 'lib/checker/options.rb', line 17 def use_rails_for_sass get_config("rails-for-sass", "true") == "true" end |