Class: Caption::CaptionBlock

Inherits:
Object
  • Object
show all
Defined in:
lib/caption/caption_block.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start_time, end_time, content) ⇒ CaptionBlock

Public: Sets up a new CaptionBlock with the given start_time, end_time, and content.

start_time - Offset in milliseconds from the

beginning of the video to this `CaptionBlock`

end_time - Offset in milliseconds from the

beginning of the video to the end of this
`CaptionBlock`

content - The contents of this ‘CaptionBlock`



14
15
16
17
18
# File 'lib/caption/caption_block.rb', line 14

def initialize(start_time, end_time, content)
  self.start_time  = start_time
  self.end_time = end_time
  self.content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



3
4
5
# File 'lib/caption/caption_block.rb', line 3

def content
  @content
end

#end_timeObject

Returns the value of attribute end_time.



3
4
5
# File 'lib/caption/caption_block.rb', line 3

def end_time
  @end_time
end

#start_timeObject

Returns the value of attribute start_time.



3
4
5
# File 'lib/caption/caption_block.rb', line 3

def start_time
  @start_time
end