Enable rubocop
This commit is contained in:
parent
329822d1a3
commit
95d4affd44
2 changed files with 4 additions and 6 deletions
2
Rakefile
2
Rakefile
|
@ -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
|
||||
|
|
|
@ -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}",
|
||||
|
|
Loading…
Reference in a new issue