class Riffer::Rig::Stores::Header
Attributes
created_at
[R]
String
cwd
[R]
String
id
[R]
String
model
[R]
String
riffer_rig_version
[R]
String
riffer_version
[R]
String
schema_version
[R]
Integer
@dynamic schema_version, id, cwd, created_at, model, riffer_rig_version, riffer_version, title, updated
title
[R]
String
updated
[R]
Time?
Store-derived metadata, not entry data: stamped by the store while it holds the physical artifact (the JSONL fileβs mtime), so it is excluded from to_h.
Public Class Methods
(Hash[Symbol, untyped] hash, ?updated: Time?) → ::Riffer::Rig::Stores::Header?
Source
# File lib/riffer/rig/stores/header.rb, line 36 def self.from_hash(hash, updated: nil) schema_version = hash[:schema_version] id = hash[:id] cwd = hash[:cwd] created_at = hash[:created_at] model = hash[:model] riffer_rig_version = hash[:riffer_rig_version] riffer_version = hash[:riffer_version] title = hash[:title] return nil unless schema_version.is_a?(Integer) return nil unless [id, cwd, created_at, model, riffer_rig_version, riffer_version, title].all?(String) new( schema_version: schema_version, id: id, cwd: cwd, created_at: created_at, model: model, riffer_rig_version: riffer_rig_version, riffer_version: riffer_version, title: title, updated: updated ) end
@rbs hash: Hash[Symbol, untyped] @rbs updated: Time? @rbs return: ::Riffer::Rig::Stores::Header?
(schema_version: Integer, id: String, cwd: String, created_at: String, model: String, riffer_rig_version: String, riffer_version: String, title: String, ?updated: Time?) → void
Source
# File lib/riffer/rig/stores/header.rb, line 71 def initialize( schema_version:, id:, cwd:, created_at:, model:, riffer_rig_version:, riffer_version:, title:, updated: nil ) @schema_version = schema_version @id = id @cwd = cwd @created_at = created_at @model = model @riffer_rig_version = riffer_rig_version @riffer_version = riffer_version @title = title @updated = updated freeze end
@rbs schema_version: Integer @rbs id: String @rbs cwd: String @rbs created_at: String @rbs model: String @rbs riffer_rig_version: String @rbs riffer_version: String @rbs title: String @rbs updated: Time? @rbs return: void