Class: Bagel::Video::ClipBuilders::StatsClipBuilder

Inherits:
ClipBuilder
  • Object
show all
Defined in:
lib/bagel/video/clip_builders/stats_clip_builder.rb

Constant Summary collapse

ID_SUFFIX =
'-stats'

Instance Attribute Summary collapse

Attributes inherited from ClipBuilder

#clip

Instance Method Summary collapse

Methods inherited from ClipBuilder

#initialize

Constructor Details

This class inherits a constructor from Bagel::Video::ClipBuilders::ClipBuilder

Instance Attribute Details

#namesObject (readonly)

Returns the value of attribute names.



3
4
5
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 3

def names
  @names
end

#pointsObject (readonly)

Returns the value of attribute points.



3
4
5
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 3

def points
  @points
end

#scoreObject (readonly)

Returns the value of attribute score.



3
4
5
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 3

def score
  @score
end

Instance Method Details

#add_clip_fadeObject



11
12
13
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 11

def add_clip_fade
  clip.fade = Fade.new(out_start: 10.5, out_duration: 1.5)
end

#add_overlaysObject



15
16
17
18
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 15

def add_overlays
  add_scoreboard_overlay
  add_stats_overlay
end

#set_idObject



7
8
9
# File 'lib/bagel/video/clip_builders/stats_clip_builder.rb', line 7

def set_id
  clip.id = "#{score.set_number.to_s.rjust(2, '0')}#{ID_SUFFIX}"
end