Class: Subconv::Caption

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#alignObject

Returns the value of attribute align.



109
110
111
# File 'lib/subconv/caption.rb', line 109

def align
  @align
end

#contentObject

Returns the value of attribute content.



109
110
111
# File 'lib/subconv/caption.rb', line 109

def content
  @content
end

#positionObject

Returns the value of attribute position.



109
110
111
# File 'lib/subconv/caption.rb', line 109

def position
  @position
end

#timespanObject

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