Created
August 28, 2016 18:29
-
-
Save userid/d8fbb4c2356a86d7a4212572f973ec0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## from https://github.com/mwunsch/tumblr/blob/56120b7eb65e77bd730fec05d2d6861b3641d08a/lib/tumblr/post/video.rb | |
| module Tumblr | |
| class Post | |
| class Video < Post | |
| def initialize(post_data = {}) | |
| super(post_data) | |
| @type = :video | |
| @embed ||= get_embed_code_from_response | |
| end | |
| def caption | |
| @caption | |
| end | |
| def embed | |
| @embed | |
| end | |
| def data | |
| @data | |
| end | |
| def get_embed_code_from_response | |
| @player.last["embed_code"] if @player and !@player.empty? | |
| end | |
| def self.post_body_keys | |
| [:embed, :caption] | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment