Class: Osb::Video

Inherits:
Object
  • Object
show all
Defined in:
lib/osb/video.rb

Overview

A video.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path:, start_time:) ⇒ Video

Returns a new instance of Video.

Parameters:

  • file_path (String)

    location of the background image relative to the beatmap directory.

  • start_time (Integer)

    when the video starts.



9
10
11
12
13
14
15
# File 'lib/osb/video.rb', line 9

def initialize(file_path:, start_time:)
  Internal.assert_type!(file_path, String, "file_path")
  Internal.assert_file_name_ext!(file_path, %w[png jpg jpeg])
  Internal.assert_type!(start_time, Integer, "start_time")

  @command = "1,#{start_time},\"#{file_path}\""
end

Instance Attribute Details

#commandsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
# File 'lib/osb/video.rb', line 5

def commands
  @commands
end

#layerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
# File 'lib/osb/video.rb', line 5

def layer
  @layer
end