Sha256: 5d58d7e7e507679f80e230b4c764097caf13a4831ae2b4cff917455cb2b5ab8d

Contents?: true

Size: 315 Bytes

Versions: 15

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

module Briard
  module Readers
    module CrossciteReader
      def read_crosscite(string: nil, **options)
        errors = jsonlint(string)
        return { "errors" => errors } if errors.present?

        string.present? ? Maremma.from_json(string) : {}
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
briard-2.4.2 lib/briard/readers/crosscite_reader.rb
briard-2.4.1 lib/briard/readers/crosscite_reader.rb
briard-2.4 lib/briard/readers/crosscite_reader.rb
briard-2.3.1 lib/briard/readers/crosscite_reader.rb
briard-2.3 lib/briard/readers/crosscite_reader.rb
briard-2.2.7 lib/briard/readers/crosscite_reader.rb
briard-2.2.6 lib/briard/readers/crosscite_reader.rb
briard-2.2.4 lib/briard/readers/crosscite_reader.rb
briard-2.2.3 lib/briard/readers/crosscite_reader.rb
briard-2.2.1 lib/briard/readers/crosscite_reader.rb
briard-2.2 lib/briard/readers/crosscite_reader.rb
briard-2.1 lib/briard/readers/crosscite_reader.rb
briard-2.0.2 lib/briard/readers/crosscite_reader.rb
briard-2.0.1 lib/briard/readers/crosscite_reader.rb
briard-2.0 lib/briard/readers/crosscite_reader.rb