Class: Typecast::Models::AlignmentSegmentCharacter
- Inherits:
-
Object
- Object
- Typecast::Models::AlignmentSegmentCharacter
- Defined in:
- lib/typecast/timestamps.rb
Instance Attribute Summary collapse
-
#character ⇒ Object
readonly
Returns the value of attribute character.
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(character:, start_time:, end_time:) ⇒ AlignmentSegmentCharacter
constructor
A new instance of AlignmentSegmentCharacter.
Constructor Details
#initialize(character:, start_time:, end_time:) ⇒ AlignmentSegmentCharacter
Returns a new instance of AlignmentSegmentCharacter.
26 27 28 29 30 |
# File 'lib/typecast/timestamps.rb', line 26 def initialize(character:, start_time:, end_time:) @character = character @start_time = start_time @end_time = end_time end |
Instance Attribute Details
#character ⇒ Object (readonly)
Returns the value of attribute character.
20 21 22 |
# File 'lib/typecast/timestamps.rb', line 20 def character @character end |
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
20 21 22 |
# File 'lib/typecast/timestamps.rb', line 20 def end_time @end_time end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
20 21 22 |
# File 'lib/typecast/timestamps.rb', line 20 def start_time @start_time end |
Class Method Details
.from_h(hash) ⇒ Object
22 23 24 |
# File 'lib/typecast/timestamps.rb', line 22 def self.from_h(hash) new(character: hash.fetch("character", ""), start_time: hash.fetch("start_time", 0).to_f, end_time: hash.fetch("end_time", 0).to_f) end |