Class: Genius::Annotation
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#comment_count ⇒ Object
readonly
Returns the value of attribute comment_count.
-
#current_user_metadata ⇒ Object
readonly
Returns the value of attribute current_user_metadata.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#share_url ⇒ Object
readonly
Returns the value of attribute share_url.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#verified_by ⇒ Object
readonly
Returns the value of attribute verified_by.
-
#votes_total ⇒ Object
readonly
Returns the value of attribute votes_total.
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
default_headers, default_params, find, from_hash, http_get, #initialize, #reload, resource_name
Constructor Details
This class inherits a constructor from Genius::Resource
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def @authors end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def body @body end |
#comment_count ⇒ Object (readonly)
Returns the value of attribute comment_count.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def comment_count @comment_count end |
#current_user_metadata ⇒ Object (readonly)
Returns the value of attribute current_user_metadata.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def @current_user_metadata end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def id @id end |
#share_url ⇒ Object (readonly)
Returns the value of attribute share_url.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def share_url @share_url end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def state @state end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def url @url end |
#verified_by ⇒ Object (readonly)
Returns the value of attribute verified_by.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def verified_by @verified_by end |
#votes_total ⇒ Object (readonly)
Returns the value of attribute votes_total.
3 4 5 |
# File 'lib/genius/annotation.rb', line 3 def votes_total @votes_total end |
Instance Method Details
#parse_resource! ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/genius/annotation.rb', line 6 def parse_resource! @verified_by = Account.from_hash(resource["verified_by"]) @share_url = resource["share_url"] @body = formatted_attribute("body") @votes_total = resource["votes_total"] @comment_count = resource["comment_count"] @authors = resource["authors"] @state = resource["state"] @current_user_metadata = resource["current_user_metadata"] @id = resource["id"] @url = resource["url"] end |