Class: Forki::Post
- Inherits:
-
Object
- Object
- Forki::Post
- Defined in:
- lib/forki/post.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#has_video ⇒ Object
readonly
Returns the value of attribute has_video.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image_file ⇒ Object
readonly
Returns the value of attribute image_file.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#num_comments ⇒ Object
readonly
Returns the value of attribute num_comments.
-
#num_shares ⇒ Object
readonly
Returns the value of attribute num_shares.
-
#num_views ⇒ Object
readonly
Returns the value of attribute num_views.
-
#reactions ⇒ Object
readonly
Returns the value of attribute reactions.
-
#screenshot_file ⇒ Object
readonly
Returns the value of attribute screenshot_file.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#video_file ⇒ Object
readonly
Returns the value of attribute video_file.
-
#video_preview_image_file ⇒ Object
readonly
Returns the value of attribute video_preview_image_file.
-
#video_preview_image_url ⇒ Object
readonly
Returns the value of attribute video_preview_image_url.
Class Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def created_at @created_at end |
#has_video ⇒ Object (readonly)
Returns the value of attribute has_video.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def has_video @has_video end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def id @id end |
#image_file ⇒ Object (readonly)
Returns the value of attribute image_file.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def image_file @image_file end |
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def image_url @image_url end |
#num_comments ⇒ Object (readonly)
Returns the value of attribute num_comments.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def num_comments @num_comments end |
#num_shares ⇒ Object (readonly)
Returns the value of attribute num_shares.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def num_shares @num_shares end |
#num_views ⇒ Object (readonly)
Returns the value of attribute num_views.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def num_views @num_views end |
#reactions ⇒ Object (readonly)
Returns the value of attribute reactions.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def reactions @reactions end |
#screenshot_file ⇒ Object (readonly)
Returns the value of attribute screenshot_file.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def screenshot_file @screenshot_file end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def text @text end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def url @url end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def user @user end |
#video_file ⇒ Object (readonly)
Returns the value of attribute video_file.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def video_file @video_file end |
#video_preview_image_file ⇒ Object (readonly)
Returns the value of attribute video_preview_image_file.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def video_preview_image_file @video_preview_image_file end |
#video_preview_image_url ⇒ Object (readonly)
Returns the value of attribute video_preview_image_url.
10 11 12 |
# File 'lib/forki/post.rb', line 10 def video_preview_image_url @video_preview_image_url end |
Class Method Details
.lookup(urls = []) ⇒ Object
5 6 7 8 |
# File 'lib/forki/post.rb', line 5 def self.lookup(urls = []) urls = [urls] unless urls.kind_of?(Array) self.scrape(urls) end |