class Riffer::Rig::Stores::ModelEntry
Attributes
model
[R]
String
@dynamic model, recorded_at
recorded_at
[R]
String?
Public Class Methods
(Hash[Symbol, untyped] hash) → ::Riffer::Rig::Stores::ModelEntry?
Source
# File lib/riffer/rig/stores/model_entry.rb, line 16 def self.from_hash(hash) model = hash[:model] return nil unless model.is_a?(String) new(model: model, recorded_at: Riffer::Rig::Stores::Timestamp.normalize(hash[:recorded_at])) end
@rbs hash: Hash[Symbol, untyped] @rbs return: ::Riffer::Rig::Stores::ModelEntry?
(model: String, ?recorded_at: String?) → void
Source
# File lib/riffer/rig/stores/model_entry.rb, line 26 def initialize(model:, recorded_at: nil) @model = model @recorded_at = recorded_at freeze end
@rbs model: String @rbs recorded_at: String? @rbs return: void