Class: GamesAndRpgParadise::Solitaire::Card
- Inherits:
-
Base
- Object
- Base
- GamesAndRpgParadise::Solitaire::Card
show all
- Defined in:
- lib/games_and_rpg_paradise/games/solitaire/card.rb
Overview
GamesAndRpgParadise::Solitaire::Solitaire
Constant Summary
collapse
- ARRAY_AVAILABLE_RANKS =
#
ARRAY_AVAILABLE_RANKS
#
%w(
Ace
2
3
4
5
6
7
8
9
10
Jack
Queen
King
)
Base::Extensions::Colours::ARRAY_AVAILABLE_KONSOLE_COLOURS
CommonExtensions::CONTROL_C_CODE, CommonExtensions::N
Class Method Summary
collapse
-
.[](i = ARGV) ⇒ Object
# === GamesAndRpgParadise::Solitaire::Card[] ========================================================================= #.
Instance Method Summary
collapse
ecomment, #efancy, #eparse, #forestgreen, #gold, #grey, #lightblue, #mediumseagreen, #mediumslateblue, #peru, #rev, sdir, sfancy, #sfile, simp, #teal, #yellow
#commandline_arguments?, #filter_away_commandline_arguments, #first_argument?, #first_non_hyphened_argument?, #set_commandline_arguments
#cat, #cd, #cliner, #copy_file, #delete, #dirname_but_retains_the_trailing_slash, #disable_colours, #ensure_that_the_log_directory_exists, #esystem, #get_user_input, #infer_the_namespace, #is_on_roebe?, #log_dir?, #mkdir, #mkdir_then_cd_into_it, #mv, #namespace?, #opne, #opnn, #project_base_directory?, #project_image_directory?, #project_yaml_directory?, #rds, #register_sigint, #remove_this_directory, #rename_file, #reset_the_internal_hash, #return_pwd, #return_today, #touch_file, #wrap, #write_what_into
Constructor Details
#initialize(commandline_arguments = nil, run_already = true) ⇒ Card
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 48
def initialize(
commandline_arguments = nil,
run_already = true
)
reset
set_commandline_arguments(
commandline_arguments
)
run if run_already
end
|
Class Method Details
.[](i = ARGV) ⇒ Object
#
GamesAndRpgParadise::Solitaire::Card[]
#
113
114
115
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 113
def self.[](i = ARGV)
new(i)
end
|
Instance Method Details
#rank? ⇒ Boolean
85
86
87
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 85
def rank?
@represents_what[1 .. -1]
end
|
#represents? ⇒ Boolean
92
93
94
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 92
def represents?
@represents_what
end
|
#reset ⇒ Object
62
63
64
65
66
67
68
69
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 62
def reset
super()
infer_the_namespace
@represents_what = nil
end
|
#run ⇒ Object
106
107
108
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 106
def run
@represents_what = commandline_arguments?.join(' ').strip
end
|
#suit? ⇒ Boolean
#
suit?
-
the club. This depends on @represents_what.
#
76
77
78
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 76
def suit?
@represents_what[0,1]
end
|
#to_s ⇒ Object
99
100
101
|
# File 'lib/games_and_rpg_paradise/games/solitaire/card.rb', line 99
def to_s
@represents_what.to_s
end
|