Consistency: rename #add_timestamp_component
Removes the add_ prefix for consistency with the other methods in WebVTT::Builder
This commit is contained in:
parent
e9d59a6dfd
commit
a999438ae4
@ -15,14 +15,14 @@ module WebVTT
|
|||||||
end
|
end
|
||||||
|
|
||||||
private def timestamp(start_time : Time::Span, end_time : Time::Span)
|
private def timestamp(start_time : Time::Span, end_time : Time::Span)
|
||||||
add_timestamp_component(start_time)
|
timestamp_component(start_time)
|
||||||
@io << " --> "
|
@io << " --> "
|
||||||
add_timestamp_component(end_time)
|
timestamp_component(end_time)
|
||||||
|
|
||||||
@io << '\n'
|
@io << '\n'
|
||||||
end
|
end
|
||||||
|
|
||||||
private def add_timestamp_component(timestamp : Time::Span)
|
private def timestamp_component(timestamp : Time::Span)
|
||||||
@io << timestamp.hours.to_s.rjust(2, '0')
|
@io << timestamp.hours.to_s.rjust(2, '0')
|
||||||
@io << ':' << timestamp.minutes.to_s.rjust(2, '0')
|
@io << ':' << timestamp.minutes.to_s.rjust(2, '0')
|
||||||
@io << ':' << timestamp.seconds.to_s.rjust(2, '0')
|
@io << ':' << timestamp.seconds.to_s.rjust(2, '0')
|
||||||
|
Loading…
Reference in New Issue
Block a user