Sha256: bc8f81cc42007541134296136213f1a6b9fefa4eb1c26dc52a9d224c0c71b084

Contents?: true

Size: 959 Bytes

Versions: 1

Compression:

Stored size: 959 Bytes

Contents

module SiteHealth
  W3CJournal = KeyStruct.new(
    :message,
    :value,
    :source,
    :type,
    :explanation,
    :parent,
    :line,
    :context,
    :element,
    :error?,
    :warning?,
    :col,
    :message_id,
    :message_count,
    :skipped_string
  )

  module W3CJournalBuilder
    # @param [W3CValidators::Result]
    # @return [W3CJournal]
    def self.build(result)
      W3CJournal.new(
        message: (result.message || '').strip,
        value: result.value,
        source: result.source,
        type: result.type,
        explanation: result.explanation,
        parent: result.parent,
        line: result.line,
        context: result.context,
        element: result.element,
        error?: result.is_error?,
        warning?: result.is_warning?,
        col: result.col,
        message_id: result.message_id,
        message_count: result.message_count,
        skipped_string: result.skippedstring
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
site_health-0.1.0 lib/site_health/journals/w3c_journal.rb