lib/sfn/lint/definition.rb in sfn-3.0.30 vs lib/sfn/lint/definition.rb in sfn-3.0.32
- old
+ new
@@ -1,6 +1,6 @@
-require 'sfn'
+require "sfn"
module Sfn
module Lint
# Lint defition
class Definition
@@ -18,11 +18,11 @@
# @param provider [String, Symbol] target provider
# @param evaluator [Proc] logic used to handle match
# @return [self]
def initialize(expr, provider = :aws, evaluator = nil, &block)
if evaluator && block
- raise ArgumentError.new 'Only evaluator or block can be provided, not both.'
+ raise ArgumentError.new "Only evaluator or block can be provided, not both."
end
@provider = Bogo::Utility.snake(provider).to_sym
@search_expression = expr
@evaluator = evaluator || block
end
@@ -44,10 +44,10 @@
# @param template [Hash] full template
# @return [TrueClass, Array<String>] true if passed. List of string results that failed
# @note override this method when subclassing
def run(result, template)
unless evaluator
- raise NotImplementedError.new 'No evaluator has been defined for this definition!'
+ raise NotImplementedError.new "No evaluator has been defined for this definition!"
end
evaluator.call(result, template)
end
end
end