Class: Nelumba::Video
Constant Summary
Constants included from Object
Object::USERNAME_REGULAR_EXPRESSION
Instance Attribute Summary collapse
-
#embed_code ⇒ Object
readonly
A fragment of HTML markup that, when embedded within another HTML page, provides an interactive user-interface for viewing or listening to the video stream.
-
#stream ⇒ Object
readonly
A MediaLink to the video content itself.
Attributes included from Object
#author, #content, #display_name, #html, #image, #published, #summary, #text, #title, #uid, #updated, #url
Instance Method Summary collapse
- #init(options = {}, &blk) ⇒ Object
-
#initialize(options = {}, &blk) ⇒ Video
constructor
Creates a new Video activity object.
-
#to_hash ⇒ Object
Returns a hash of all relevant fields.
-
#to_json_hash ⇒ Object
Returns a hash of all relevant fields with JSON activity streams conventions.
Methods included from Object
#mentions, #reply_to, #to_as1, #to_html, #to_json, #to_text
Constructor Details
#initialize(options = {}, &blk) ⇒ Video
Creates a new Video activity object.
14 15 16 |
# File 'lib/nelumba/video.rb', line 14 def initialize( = {}, &blk) init(, &blk) end |
Instance Attribute Details
#embed_code ⇒ Object (readonly)
A fragment of HTML markup that, when embedded within another HTML page, provides an interactive user-interface for viewing or listening to the video stream.
8 9 10 |
# File 'lib/nelumba/video.rb', line 8 def @embed_code end |
#stream ⇒ Object (readonly)
A MediaLink to the video content itself.
11 12 13 |
# File 'lib/nelumba/video.rb', line 11 def stream @stream end |
Instance Method Details
#init(options = {}, &blk) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/nelumba/video.rb', line 18 def init( = {}, &blk) super(, &blk) @embed_code = [:embed_code] @stream = [:stream] end |
#to_hash ⇒ Object
Returns a hash of all relevant fields.
26 27 28 29 30 31 |
# File 'lib/nelumba/video.rb', line 26 def to_hash { :embed_code => @embed_code, :stream => @stream }.merge(super) end |
#to_json_hash ⇒ Object
Returns a hash of all relevant fields with JSON activity streams conventions.
35 36 37 38 39 40 41 |
# File 'lib/nelumba/video.rb', line 35 def to_json_hash { :objectType => "video", :embedCode => @embed_code, :stream => @stream }.merge(super) end |