Class: GamesParadise::Solitaire::Player
- Inherits:
-
Base
- Object
- Base
- GamesParadise::Solitaire::Player
show all
- Defined in:
- lib/games_paradise/solitaire/player.rb
Overview
GamesParadise::Solitaire::Player
Constant Summary
Constants inherited
from Base
Base::CONTROL_C_CODE, Base::N
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === GamesParadise::Solitaire::Player[] ========================================================================= #.
Instance Method Summary
collapse
Methods inherited from Base
#cat, #commandline_arguments?, #efancy, #eparse, #first_argument?, #forestgreen, #gold, #lightblue, #lightgreen, #mediumorchid, #mediumslateblue, #opnn, #peru, #register_sigint, #rev, #royalblue, #set_commandline_arguments, #sfile, #steelblue, #teal, #tomato, #yellow
Methods included from BaseModule
#cliner, #commandline_arguments?, #first_argument?, #infer_the_namespace, #namespace?, #rename_file, #reset_the_internal_hash, #return_pwd, #set_commandline_arguments
Constructor Details
#initialize(commandline_arguments = nil, run_already = true) ⇒ Player
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/games_paradise/solitaire/player.rb', line 25
def initialize(
commandline_arguments = nil,
run_already = true
)
reset
set_commandline_arguments(
commandline_arguments
)
run if run_already
end
|
Class Method Details
.[](i = '') ⇒ Object
#
GamesParadise::Solitaire::Player[]
#
61
62
63
|
# File 'lib/games_paradise/solitaire/player.rb', line 61
def self.[](i = '')
new(i)
end
|
Instance Method Details
#reset ⇒ Object
39
40
41
42
43
|
# File 'lib/games_paradise/solitaire/player.rb', line 39
def reset
super()
infer_the_namespace
@playing_cards = []
end
|