struct

DataDungeon::AssetRecord

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(id : Int64, asset_type : String, media : String, content_type : String, file_path : String, key : String | Nil, file_hash : String | Nil, created_at : String, last_used_at : String | Nil = nil, use_count : Int32 = 0, permanent : Bool = false, generator : String | Nil = nil, generation : String | Nil = nil, description : String | Nil = nil, description_hash : String | Nil = nil, generated : Bool = false, rating : Int32 | Nil = nil, flagged : Bool = false, made_at : String | Nil = nil, retired_at : String | Nil = nil, has_recipe : Bool = false)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

asset_type
Source
content_type
Source
created_at
Source
description
Source
description_hash

The description's SHA-256, the same in every store: assets with the same hash share one description (list_assets(description_hash:)).

Source
file_hash
Source
file_path
Source
flagged
Source
generated
Source
generation
Source
generator
Source
has_recipe?

Whether it has a recipe (DB#recipe), so a reader knows to ask for it.

Source
key

The asset's key in its type's own index, derived from its traits: its type and traits' values in the registered order, portrait.golden.pg.f.human. Several assets can share a key; the id is what names one durably. Nil for an asset of an unregistered type, stored before 0.12 required registering.

Source
last_used_at
Source
made_at

When the content was made (by default, when it was filed): the date "newest first" prefers by.

Source
media
Source
permanent
Source
rating
Source
retired?
Source
retired_at

When it was retired, by a newer take superseding it or on its own; a retired asset is kept but left out of lookups, listings and searches.

Source
use_count
Source