Module: GamesParadise::Colours
- Included in:
- HelloWorld, ShakesAndFidgets, ShakesAndFidgets::UserInput, ShakesAndFidgets::Waffenladen
- Defined in:
- lib/games_paradise/colours/colours.rb
Overview
GamesParadise::Colours
Instance Method Summary collapse
- #brown(i = '') ⇒ Object
- #cfile(i = '') ⇒ Object
-
#convert_colour(colour) ⇒ Object
(also: #return_colour)
# === convert_colour ========================================================================= #.
- #fancy(i = '') ⇒ Object (also: #cfancy, #blue)
-
#normal(i = '') ⇒ Object
(also: #cnormal, #rev)
rev means “revert”.
- #pink(i = '') ⇒ Object
- #red(i = '') ⇒ Object
-
#yel(i = '') ⇒ Object
# Next come the various colour codes.
Instance Method Details
#brown(i = '') ⇒ Object
66 |
# File 'lib/games_paradise/colours/colours.rb', line 66 def brown(i = ''); convert_colour('brown')+i.to_s; end |
#cfile(i = '') ⇒ Object
64 |
# File 'lib/games_paradise/colours/colours.rb', line 64 def cfile(i = ''); convert_colour('boldred')+i.to_s; end |
#convert_colour(colour) ⇒ Object Also known as: return_colour
#
convert_colour
#
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/games_paradise/colours/colours.rb', line 39 def convert_colour(colour) _ = '' case colour when 'boldred','red' _ << ::Colours::BOLDRED when 'brown' _ << ::Colours::YELLOW when 'yel','yellow' _ << ::Colours::BOLDYELLOW when 'green' _ << ::Colours::GREEN when 'lightblue' _ << ::Colours::LIGHTBLUE when 'pink' _ << ::Colours::PINK end return _ end |
#fancy(i = '') ⇒ Object Also known as: cfancy, blue
62 |
# File 'lib/games_paradise/colours/colours.rb', line 62 def fancy(i = ''); convert_colour('lightblue')+i.to_s; end |
#normal(i = '') ⇒ Object Also known as: cnormal, rev
rev means “revert”.
63 |
# File 'lib/games_paradise/colours/colours.rb', line 63 def normal(i = ''); convert_colour('green')+i.to_s; end |
#pink(i = '') ⇒ Object
67 |
# File 'lib/games_paradise/colours/colours.rb', line 67 def pink(i = ''); convert_colour('pink')+i.to_s; end |
#red(i = '') ⇒ Object
65 |
# File 'lib/games_paradise/colours/colours.rb', line 65 def red(i = ''); convert_colour('red')+i.to_s; end |
#yel(i = '') ⇒ Object
#
Next come the various colour codes.
#
61 |
# File 'lib/games_paradise/colours/colours.rb', line 61 def yel(i = ''); convert_colour('yellow')+i.to_s; end |