Class: Osb::Background

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

Overview

Beatmap's background.

Instance Method Summary collapse

Constructor Details

#initialize(file_path:) ⇒ Background

Returns a new instance of Background.

Parameters:

  • file_path (String)

    location of the background image relative to the beatmap directory.



10
11
12
13
14
# File 'lib/osb/background.rb', line 10

def initialize(file_path:)
  Internal.assert_type!(file_path, String, "file_path")
  Internal.assert_file_name_ext!(file_path, %w[png jpg jpeg])
  @command = "0,0,\"#{file_path}\""
end