Class: Subconv::Caption
- Inherits:
-
Object
- Object
- Subconv::Caption
- Defined in:
- lib/subconv/caption.rb
Overview
Caption displayed on the screen at a specific position for a given amount of time
Instance Attribute Summary collapse
-
#align ⇒ Object
Returns the value of attribute align.
-
#content ⇒ Object
Returns the value of attribute content.
-
#position ⇒ Object
Returns the value of attribute position.
-
#timespan ⇒ Object
Returns the value of attribute timespan.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(params) ⇒ Caption
constructor
A new instance of Caption.
Constructor Details
#initialize(params) ⇒ Caption
Returns a new instance of Caption.
96 97 98 99 100 101 102 103 |
# File 'lib/subconv/caption.rb', line 96 def initialize(params) # :start, :middle or :end @align = params[:align] @timespan = params[:timespan] # Position instance, :top or :bottom @position = params[:position] @content = params[:content] end |
Instance Attribute Details
#align ⇒ Object
Returns the value of attribute align.
109 110 111 |
# File 'lib/subconv/caption.rb', line 109 def align @align end |
#content ⇒ Object
Returns the value of attribute content.
109 110 111 |
# File 'lib/subconv/caption.rb', line 109 def content @content end |
#position ⇒ Object
Returns the value of attribute position.
109 110 111 |
# File 'lib/subconv/caption.rb', line 109 def position @position end |
#timespan ⇒ Object
Returns the value of attribute timespan.
109 110 111 |
# File 'lib/subconv/caption.rb', line 109 def timespan @timespan end |
Instance Method Details
#==(other) ⇒ Object
105 106 107 |
# File 'lib/subconv/caption.rb', line 105 def ==(other) self.class == other.class && @timespan == other.timespan && @position == other.position && @content == other.content end |