Sha256: 6733074471b21ec5fbb076b3e35d3ce2de3931d86c90df616b38e906c89b19e4

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

require "fido_metadata/attributes"
require "fido_metadata/entry"
require "fido_metadata/coercer/date"
require "fido_metadata/coercer/objects"

module FidoMetadata
  class TableOfContents
    extend Attributes

    json_accessor("legalHeader")
    json_accessor("nextUpdate", Coercer::Date)
    json_accessor("entries", Coercer::Objects.new(Entry))
    json_accessor("no")

    def expires_in
      next_update.to_time.to_i - Time.now.to_i
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fido_metadata-0.4.0 lib/fido_metadata/table_of_contents.rb