Class: RubySky::Raw::Post
- Inherits:
-
Object
- Object
- RubySky::Raw::Post
- Defined in:
- lib/rubysky/raw/post.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#cid ⇒ Object
readonly
Returns the value of attribute cid.
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#validation_status ⇒ Object
readonly
Returns the value of attribute validation_status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(uri:, cid:, commit:, validation_status:) ⇒ Post
constructor
A new instance of Post.
- #update_by_hash(hash) ⇒ Object
Constructor Details
#initialize(uri:, cid:, commit:, validation_status:) ⇒ Post
Returns a new instance of Post.
14 15 16 17 18 19 |
# File 'lib/rubysky/raw/post.rb', line 14 def initialize(uri:, cid:, commit:, validation_status:) @uri = uri @cid = cid @commit = commit @validation_status = validation_status end |
Instance Attribute Details
#cid ⇒ Object (readonly)
Returns the value of attribute cid.
12 13 14 |
# File 'lib/rubysky/raw/post.rb', line 12 def cid @cid end |
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
12 13 14 |
# File 'lib/rubysky/raw/post.rb', line 12 def commit @commit end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
12 13 14 |
# File 'lib/rubysky/raw/post.rb', line 12 def uri @uri end |
#validation_status ⇒ Object (readonly)
Returns the value of attribute validation_status.
12 13 14 |
# File 'lib/rubysky/raw/post.rb', line 12 def validation_status @validation_status end |
Class Method Details
.from_hash(hash) ⇒ Object
6 7 8 9 10 |
# File 'lib/rubysky/raw/post.rb', line 6 def self.from_hash(hash) allocate.tap do |this| this.update_by_hash hash end end |
Instance Method Details
#update_by_hash(hash) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/rubysky/raw/post.rb', line 21 def update_by_hash(hash) @uri = hash["uri"] @cid = hash["cid"] @commit = hash["commit"] @validation_status = hash["validationStatus"] end |