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']
|
t.test_files = FileList['spec/**/*_spec.rb']
|
||||||
end
|
end
|
||||||
|
|
||||||
# Rake::Task[:spec].enhance ['spec:rubocop']
|
Rake::Task[:spec].enhance ['spec:rubocop']
|
||||||
|
|
||||||
task :default => :spec
|
task :default => :spec
|
||||||
|
|
|
@ -20,11 +20,9 @@ module Mm2ep
|
||||||
def initialize(str, value)
|
def initialize(str, value)
|
||||||
@errors = []
|
@errors = []
|
||||||
@name = str
|
@name = str
|
||||||
@value = case value
|
@value = value
|
||||||
when /true/i then true
|
@value = true if value =~ /^true$/i
|
||||||
when /false/i then false
|
@value = false if value =~ /^false$/i
|
||||||
else value
|
|
||||||
end
|
|
||||||
return unless @value.nil?
|
return unless @value.nil?
|
||||||
@errors << VarNotDefined.new(
|
@errors << VarNotDefined.new(
|
||||||
message: "No value for #{@name}",
|
message: "No value for #{@name}",
|
||||||
|
|
Loading…
Reference in a new issue