Class: Twingly::Analytics::Post
- Inherits:
-
Object
- Object
- Twingly::Analytics::Post
- Defined in:
- lib/twingly-analytics/post.rb
Instance Attribute Summary collapse
-
#authority ⇒ Object
readonly
Returns the value of attribute authority.
-
#blog_name ⇒ Object
readonly
Returns the value of attribute blog_name.
-
#blog_rank ⇒ Object
readonly
Returns the value of attribute blog_rank.
-
#blog_url ⇒ Object
readonly
Returns the value of attribute blog_url.
-
#indexed ⇒ Object
readonly
Returns the value of attribute indexed.
-
#language_code ⇒ Object
readonly
Returns the value of attribute language_code.
-
#published ⇒ Object
readonly
Returns the value of attribute published.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#authority ⇒ Object (readonly)
Returns the value of attribute authority.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def @authority end |
#blog_name ⇒ Object (readonly)
Returns the value of attribute blog_name.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def blog_name @blog_name end |
#blog_rank ⇒ Object (readonly)
Returns the value of attribute blog_rank.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def blog_rank @blog_rank end |
#blog_url ⇒ Object (readonly)
Returns the value of attribute blog_url.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def blog_url @blog_url end |
#indexed ⇒ Object (readonly)
Returns the value of attribute indexed.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def indexed @indexed end |
#language_code ⇒ Object (readonly)
Returns the value of attribute language_code.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def language_code @language_code end |
#published ⇒ Object (readonly)
Returns the value of attribute published.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def published @published end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def summary @summary end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/twingly-analytics/post.rb', line 8 def url @url end |
Instance Method Details
#set_values(params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/twingly-analytics/post.rb', line 11 def set_values(params) @url = params.fetch('url') @title = params.fetch('title') @summary = params.fetch('summary') @language_code = params.fetch('languageCode') @published = DateTime.parse(params.fetch('published')) @indexed = DateTime.parse(params.fetch('indexed')) @blog_url = params.fetch('blogUrl') @blog_name = params.fetch('blogName') @authority = params.fetch('authority').to_i @blog_rank = params.fetch('blogRank').to_i @tags = params.fetch('tags', []) end |