Module: RTS

Defined in:
lib/rubytrackselector.rb,
lib/rubytrackselector/utp.rb,
lib/rubytrackselector/home.rb

Overview

– Ruby Track Selector - A music selecting library for Rubygame. Copyright © 2010 Raphael Robatsch.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++

Defined Under Namespace

Classes: Rts

Constant Summary collapse

VERSION =

Ruby Track Selector Version.

[major, minor, revision]

[0, 0, 2]
"menu"
CALM_MENU =

Tag for calm menu tracks.

"calm_menu"
LOADING =

Tag for loading tracks.

"loading"
CALM_LOADING =

Tag for calm loading tracks.

"calm_loading"
ACTION_SCENE =

Tag for action tracks.

"action_scene"
PUZZLE_SCENE =

Tag for puzzle tracks.

"puzzle_scene"
WORLD_SCENE =

Tag for world map tracks.

"world_scene"
NONAME =

:nodoc:

nil
RTS_DIR =

:nodoc:

".rubytracks"

Class Method Summary collapse

Class Method Details

.homeObject

Returns the user’s home directory.



24
25
26
# File 'lib/rubytrackselector/home.rb', line 24

def self.home
	return File.expand_path("~")
end

.user_music(create = true) ⇒ Object

Returns the path to the user’s custom music directory.

create

If this parameter is true, the directory will be created if it doesn’t exists.



32
33
34
35
36
# File 'lib/rubytrackselector/home.rb', line 32

def self.user_music(create = true)
	dn = File.join(home, RTS_DIR)
	Dir.mkdir(dn) if create && !Dir.exists?(dn)
	return dn
end