Class: GamesAndRpgParadise::MagicTheGathering::Base
- Inherits:
-
Base
- Object
- Base
- GamesAndRpgParadise::MagicTheGathering::Base
show all
- Defined in:
- lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb
Overview
GamesAndRpgParadise::MagicTheGathering::Base
Constant Summary
collapse
- LOG_DIR =
::GamesAndRpgParadise::MagicTheGathering.log_dir?
Base::Extensions::Colours::ARRAY_AVAILABLE_KONSOLE_COLOURS
CommonExtensions::CONTROL_C_CODE, CommonExtensions::N
Class Method Summary
collapse
-
.[](i = ARGV) ⇒ Object
# === GamesAndRpgParadise::MagicTheGathering::Base[] ========================================================================= #.
Instance Method Summary
collapse
ecomment, #efancy, #eparse, #forestgreen, #gold, #grey, #lightblue, #mediumseagreen, #mediumslateblue, #peru, 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, #get_user_input, #infer_the_namespace, #is_on_roebe?, #mkdir, #mkdir_then_cd_into_it, #mv, #namespace?, #opne, #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
Class Method Details
.[](i = ARGV) ⇒ Object
#
GamesAndRpgParadise::MagicTheGathering::Base[]
#
182
183
184
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 182
def self.[](i = ARGV)
new(i)
end
|
Instance Method Details
#convert(name_of_the_png_file, name_of_the_image_file) ⇒ Object
143
144
145
146
147
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 143
def convert(
name_of_the_png_file, name_of_the_image_file
)
::GamesAndRpgParadise.convert(name_of_the_png_file, name_of_the_image_file)
end
|
#ensure_that_the_log_directory_exists ⇒ Object
#
ensure_that_the_log_directory_exists
#
#is_png_file?(i) ⇒ Boolean
Also known as:
is_a_png_file?
#
is_png_file?
Query whether we can assume the input to be a .png file. This will be true typically for “foobar.png”, if the program file can identify this as a png-file.
#
64
65
66
67
68
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 64
def is_png_file?(i)
result = `file #{i}`
return true if result.include? ': PNG image data'
return false end
|
#lightgreen(i) ⇒ Object
101
102
103
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 101
def lightgreen(i)
::Colours.lightgreen(i)
end
|
#log_dir? ⇒ Boolean
Also known as:
log_directory?
175
176
177
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 175
def log_dir?
LOG_DIR end
|
#opnn(i) ⇒ Object
122
123
124
125
126
127
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 122
def opnn(i)
if i.is_a? String
i = { namespace: i }
end
Opn.opn(i)
end
|
#orange(i) ⇒ Object
80
81
82
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 80
def orange(i)
::Colours.orange(i)
end
|
#palegoldenrod(i) ⇒ Object
108
109
110
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 108
def palegoldenrod(i)
::Colours.palegoldenrod(i)
end
|
#pngopt(i, be_verbose = :be_silent) ⇒ Object
#
pngopt
Use pngopt to reduce the file size.
#
135
136
137
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 135
def pngopt(i, be_verbose = :be_silent)
::GamesAndRpgParadise.pngopt(i, be_verbose)
end
|
#rev ⇒ Object
152
153
154
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 152
def rev
::Colours.rev
end
|
#slateblue(i) ⇒ Object
94
95
96
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 94
def slateblue(i)
::Colours.slateblue(i)
end
|
#springgreen(i) ⇒ Object
87
88
89
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 87
def springgreen(i)
::Colours.springgreen(i)
end
|
#turquoise(i) ⇒ Object
115
116
117
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 115
def turquoise(i)
::Colours.turquoise(i)
end
|
#write_what_into(what, into) ⇒ Object
#
write_what_into
Wrapper over SaveFile.write_what_into().
#
168
169
170
|
# File 'lib/games_and_rpg_paradise/games/magic_the_gathering/base/base.rb', line 168
def write_what_into(what, into)
::SaveFile.write_what_into(what, into) if Object.const_defined?(::SaveFile)
end
|