Class: Pgai::Resources::Remote::Snapshot
Class Method Summary
collapse
Methods inherited from BaseRecord
client, #client, client=, #refresh_attributes, with_client
Methods included from Attributes
#assign_attribute, #assign_attributes, #has_attribute?, included, #initialize
Class Method Details
.all ⇒ Object
16
17
18
|
# File 'lib/pgai/resources/remote/snapshot.rb', line 16
def all
client.get(path).map { new(_1) }
end
|
.latest ⇒ Object
20
21
22
|
# File 'lib/pgai/resources/remote/snapshot.rb', line 20
def latest
all.max_by(&:created_at)
end
|
.path ⇒ Object
24
25
26
|
# File 'lib/pgai/resources/remote/snapshot.rb', line 24
def path
"snapshots"
end
|