Class: Keybase::Dump
- Inherits:
-
Object
- Object
- Keybase::Dump
- Defined in:
- lib/keybase/models/dump.rb
Overview
A dump object containing hashes, IDs and data links from which a mirror can be configured.
Instance Attribute Summary collapse
-
#changes_from_parent ⇒ Object
readonly
Returns the value of attribute changes_from_parent.
-
#changes_sha256 ⇒ Object
readonly
Returns the value of attribute changes_sha256.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#full_data ⇒ Object
readonly
Returns the value of attribute full_data.
-
#full_data_sha256 ⇒ Object
readonly
Returns the value of attribute full_data_sha256.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#parent_dump_id ⇒ Object
readonly
Returns the value of attribute parent_dump_id.
Class Method Summary collapse
-
.all ⇒ [Keybase::Dump]
Retrieve the dump history from Keybase.
-
.latest ⇒ Keybase::Dump
Retrieve the latest dump from Keybase.
Instance Method Summary collapse
-
#initialize(params) ⇒ Dump
constructor
A new instance of Dump.
Constructor Details
#initialize(params) ⇒ Dump
Returns a new instance of Dump.
9 10 11 12 13 14 15 16 17 |
# File 'lib/keybase/models/dump.rb', line 9 def initialize(params) @id = params['dump_id'] @full_data = params['full_data'] @full_data_sha256 = params['full_data_sha256'] @parent_dump_id = params['parent_dump_id'] @changes_from_parent = params['changes_from_parent'] @changes_sha256 = params['changes_sha256'] @created_at = Time.at(params['ctime']).to_datetime end |
Instance Attribute Details
#changes_from_parent ⇒ Object (readonly)
Returns the value of attribute changes_from_parent.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def changes_from_parent @changes_from_parent end |
#changes_sha256 ⇒ Object (readonly)
Returns the value of attribute changes_sha256.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def changes_sha256 @changes_sha256 end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def created_at @created_at end |
#full_data ⇒ Object (readonly)
Returns the value of attribute full_data.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def full_data @full_data end |
#full_data_sha256 ⇒ Object (readonly)
Returns the value of attribute full_data_sha256.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def full_data_sha256 @full_data_sha256 end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def id @id end |
#parent_dump_id ⇒ Object (readonly)
Returns the value of attribute parent_dump_id.
6 7 8 |
# File 'lib/keybase/models/dump.rb', line 6 def parent_dump_id @parent_dump_id end |
Class Method Details
.all ⇒ [Keybase::Dump]
Retrieve the dump history from Keybase
22 23 24 |
# File 'lib/keybase/models/dump.rb', line 22 def self.all Request::Dump.all.map{|dump| new(dump)} end |
.latest ⇒ Keybase::Dump
Retrieve the latest dump from Keybase
29 30 31 |
# File 'lib/keybase/models/dump.rb', line 29 def self.latest new(Request::Dump.latest) end |