Class: GamesAndRpgParadise::Mud::Characters
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::Mud::Characters
show all
- Defined in:
- lib/games_and_rpg_paradise/mud/characters/characters.rb
Overview
RpgParadise::Mud::Characters
Constant Summary
collapse
- SAVED_CHARACTERS =
RpgParadise::Mud::SAVED_CHARACTERS
Class Method Summary
collapse
-
.[] ⇒ Object
# === RpgParadise::Mud::Characters[] ========================================================================= #.
-
.available? ⇒ Boolean
# === RpgParadise::Mud::Characters.available? ========================================================================= #.
-
.create(i = :new) ⇒ Object
# === RpgParadise::Mud::Characters.create ========================================================================= #.
-
.return_available_characters(i = SAVED_CHARACTERS) ⇒ Object
# === RpgParadise::Mud::Characters.return_available_characters ========================================================================= #.
Instance Method Summary
collapse
Constructor Details
#initialize(run_already = true) ⇒ Characters
34
35
36
37
38
39
|
# File 'lib/games_and_rpg_paradise/mud/characters/characters.rb', line 34
def initialize(
run_already = true
)
reset
run if run_already
end
|
Class Method Details
.[] ⇒ Object
#
RpgParadise::Mud::Characters[]
#
78
79
80
|
# File 'lib/games_and_rpg_paradise/mud/characters/characters.rb', line 78
def self.[]
available?
end
|
.available? ⇒ Boolean
#
RpgParadise::Mud::Characters.available?
#
44
45
46
47
48
49
50
51
|
# File 'lib/games_and_rpg_paradise/mud/characters/characters.rb', line 44
def self.available?
e 'The available characters (found in directory '+
sdir(SAVED_CHARACTERS)+') are:'
return_available_characters.each {|filename|
_ = File.basename(filename).gsub(/#{File.extname(filename)}/, '')
e " - #{_}"
}
end
|
.create(i = :new) ⇒ Object
#
RpgParadise::Mud::Characters.create
#
65
66
67
68
69
70
71
72
73
|
# File 'lib/games_and_rpg_paradise/mud/characters/characters.rb', line 65
def self.create(i = :new)
case i
when :new
CharacterCreationProcess.new :interactive
end
end
|
.return_available_characters(i = SAVED_CHARACTERS) ⇒ Object
#
RpgParadise::Mud::Characters.return_available_characters
#
56
57
58
59
60
|
# File 'lib/games_and_rpg_paradise/mud/characters/characters.rb', line 56
def self.return_available_characters(
i = SAVED_CHARACTERS
)
Dir["#{i}*.yml"]
end
|