lib/aranha/parsers/source_address.rb in aranha-parsers-0.2.2 vs lib/aranha/parsers/source_address.rb in aranha-parsers-0.3.0

- old
+ new

@@ -18,17 +18,18 @@ ::Aranha::Parsers::SourceAddress::File ].freeze def detect_sub(source) return source.sub if source.is_a?(self) + SUBS.each do |sub| return sub.new(source) if sub.valid_source?(source) end raise "No content fetcher found for source \"#{source}\"" end def deserialize(string) - new(string =~ %r{\A[a-z]+://} ? string.strip : ::YAML.load(string)) + new(string =~ %r{\A[a-z]+://} ? string.strip : ::YAML.load(string)) # rubocop:disable Security/YAMLLoad end def from_file(path) deserialize(::File.read(path)) end