Enable rubocop

This commit is contained in:
Glenn Y. Rolland 2017-09-20 10:46:17 +02:00
parent 329822d1a3
commit 95d4affd44
2 changed files with 4 additions and 6 deletions

View file

@ -23,6 +23,6 @@ Rake::TestTask.new(:spec) do |t|
t.test_files = FileList['spec/**/*_spec.rb']
end
# Rake::Task[:spec].enhance ['spec:rubocop']
Rake::Task[:spec].enhance ['spec:rubocop']
task :default => :spec

View file

@ -20,11 +20,9 @@ module Mm2ep
def initialize(str, value)
@errors = []
@name = str
@value = case value
when /true/i then true
when /false/i then false
else value
end
@value = value
@value = true if value =~ /^true$/i
@value = false if value =~ /^false$/i
return unless @value.nil?
@errors << VarNotDefined.new(
message: "No value for #{@name}",