# Class LittleGhost::Models::Catalog

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Models/Catalog.html

Resolves model facts from refreshed data and the snapshot packaged with
LittleGhost. Refresh is always explicit.

## Inheritance

`LittleGhost::Models::Catalog < Object`

## Constants

### `SNAPSHOT_PATH`

Path to the offline model metadata snapshot packaged with the gem.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
.new(sources: [], snapshot_path: SNAPSHOT_PATH, clock: -> { Time.now.utc })
```

Builds a layered catalog from bundled and refreshed facts.

## Instance methods

<a id="method-i-details"></a>
### `#details`

```ruby
#details(target)
```

Returns immutable normalized details for `target`.

<a id="method-i-refresh-21"></a>
### `#refresh!`

```ruby
#refresh!(target: nil)
```

Refreshes one target or all models. Failed sources leave the last good catalog
untouched and are returned to the caller for reporting.
