lib/fear/extractor/matcher.rb in fear-1.0.0 vs lib/fear/extractor/matcher.rb in fear-1.1.0
- old
+ new
@@ -1,12 +1,14 @@
-require 'ostruct'
+# frozen_string_literal: true
+require "ostruct"
+
module Fear
module Extractor
# @abstract abstract matcher to inherit from.
class Matcher < OpenStruct
- autoload :And, 'fear/extractor/matcher/and'
+ autoload :And, "fear/extractor/matcher/and"
EMPTY_HASH = {}.freeze
EMPTY_ARRAY = [].freeze
# @param node [Fear::Extractor::Grammar::Node]
@@ -44,10 +46,10 @@
#
def failure_reason(other)
if defined_at?(other)
Fear.none
else
- Fear.some("Expected `#{other.inspect}` to match:\n#{input}\n#{'~' * input_position}^")
+ Fear.some("Expected `#{other.inspect}` to match:\n#{input}\n#{"~" * input_position}^")
end
end
end
end
end