Class: Osb::Background

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

Overview

Beatmap’s background.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path:) ⇒ Background

Returns a new instance of Background.

Parameters:

  • file_name (String)

    location of the background image relative to the beatmap directory.



8
9
10
11
12
# File 'lib/osb/background.rb', line 8

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

Instance Attribute Details

#commandObject (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/background.rb', line 5

def command
  @command
end