Class: AsciiParadise::Flexbox
- Inherits:
-
Base
- Object
- Base
- AsciiParadise::Flexbox
show all
- Defined in:
- lib/ascii_paradise/flexbox/flexbox.rb
Overview
Constant Summary
collapse
- NAMESPACE =
inspect
- UNICODE_SYMBOL_TO_USE_FOR_THE_TOP_LEFT_AREA =
#
UNICODE_SYMBOL_TO_USE_FOR_THE_TOP_LEFT_AREA
This emoji provides some little “graphical” modification to the flexbox title.
#
'✨️'
- COLOUR_FOR_THE_TITLE =
:mediumturquoise
- TEST_INPUT =
#
This is simply a hardcoded String that can be used to quickly test the Flexbox, without depending on an external project, such as the “rbt” gem.
#
'Compiling this program: | htop |
Assumed Operating System: | Windows |
Prefix: | /home/Programs/Htop/2.2.0/ |
Program version: | 2.2.0 |
Program path: | /home/x/src/htop/htop-2.2.0.tar.xz |
Will be extracted towards: | /home/Temp/rbt/htop-2.2.0/ |
Keep the archive extracted: | Yes. |
Will ccache be used: | No. |
CFLAGS in use: | -O2 -fPIC -fno-strict-overflow -Wno-error |
Use a build directory: | Yes, at |
configure options: | --disable-unicode |
Host architecture in use: | x86_64 |
Build system to be used: | :infer_automatically |
Compiler to be used: | gcc |
URL to the source archive: | http://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz |
Homepage: | http://hisham.hm/htop/ |'
- MAX_VALUE_FOR_PADDING =
#
MAX_VALUE_FOR_PADDING
#
100
- N_LEFT_PAD_FOR_THE_RBT_PROJECT =
#
N_LEFT_PAD_FOR_THE_RBT_PROJECT
#
27
- N_RIGHT_PAD_FOR_THE_RBT_PROJECT =
#
N_RIGHT_PAD_FOR_THE_RBT_PROJECT
This should be sufficiently large to accomodate different remote URL entries.
#
78
- TRY_TO_USE_UNICODE_SYMBOLS_FOR_THE_COMMANDLINE_USER_INTERFACE =
#
TRY_TO_USE_UNICODE_SYMBOLS_FOR_THE_COMMANDLINE_USER_INTERFACE
If the following constant is set to true then the Flexbox will try to use Unicode symbols for the commandline interface. This may look nicer, depending on the terminal and encoding in use.
#
true
- SHOW_REMOTE_URLS_BY_DEFAULT =
#
SHOW_REMOTE_URLS_BY_DEFAULT
If this constant is set to true then the Flexbox will also try to show the two entries “url1” and “homepage”, if these are available.
#
true
- VERTICAL_ASCII_BAR =
'|'
- DEFAULT_COLOURS_FOR_RBT =
#
DEFAULT_COLOURS_FOR_RBT
This constant can be used to notify the default colours for the Flexbox to use.
#
{
default_colour: :steelblue, default_colour_for_the_border: :slateblue, required_dependencies_on: :olivedrab,
will_be_extracted_towards: :mediumslateblue,
url1: :mediumpurple,
homepage: :lightseagreen, compiler_to_be_used: :mediumpurple,
parameters_for_make: :seagreen,
build_system_to_be_used: :seagreen
}
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === AsciiParadise::Flexbox[] ========================================================================= #.
Instance Method Summary
collapse
-
#add_this_to_the_right_padding(i) ⇒ Object
(also: #add_this_number_to_right_just)
# === add_this_to_the_right_padding ========================================================================= #.
-
#autoexpand ⇒ Object
# === autoexpand (auto tag, autoexpand tag).
-
#blfs? ⇒ Boolean
(also: #blfs_entry?)
# === blfs? ========================================================================= #.
-
#bottom_ecliner ⇒ Object
# === bottom_ecliner ========================================================================= #.
-
#clear_hash ⇒ Object
# === clear_hash ========================================================================= #.
-
#cliner(use_n_tokens = :default, use_this_token = :infer) ⇒ Object
# === cliner (cliner tag).
-
#colourize_border(use_this_colour = :default) ⇒ Object
(also: #set_border_colour)
# === colourize_border.
-
#colourize_border? ⇒ Boolean
# === colourize_border.
-
#colourize_right_side_with_these_colours(*i) ⇒ Object
# === colourize_right_side_with_these_colours.
-
#colourize_this_in_that_colour(this, that_colour = @use_this_colour_for_the_border) ⇒ Object
# === colourize_this_in_that_colour.
-
#colourize_this_via_the_default_border_colour(i) ⇒ Object
# === colourize_this_via_the_default_border_colour ========================================================================= #.
-
#colourized_verbose_truth(i) ⇒ Object
# === colourized_verbose_truth ========================================================================= #.
-
#commandline_arguments? ⇒ Boolean
# === commandline_arguments? ========================================================================= #.
-
#compile_dataset? ⇒ Boolean
(also: #cookbook_dataset?, #dataset?)
# === compile_dataset? ========================================================================= #.
-
#compile_this_program? ⇒ Boolean
(also: #input?)
# === compile_this_program? ========================================================================= #.
-
#compiler_to_use? ⇒ Boolean
# === compiler_to_use? ========================================================================= #.
-
#content? ⇒ Boolean
# === content?.
-
#disable_colours ⇒ Object
# === disable_colours ========================================================================= #.
-
#display ⇒ Object
(also: #show)
# === display (display tag, report tag).
-
#do_what=(i = 'Compiling') ⇒ Object
# === do_what=.
-
#does_the_program_have_to_be_compiled? ⇒ Boolean
# === does_the_program_have_to_be_compiled? ========================================================================= #.
-
#ecliner ⇒ Object
# === ecliner ========================================================================= #.
-
#empty? ⇒ Boolean
# === empty?.
-
#enable_rbt_specific_behaviour ⇒ Object
# === enable_rbt_specific_behaviour ========================================================================= #.
-
#extract_only? ⇒ Boolean
-
#extract_to_which_directory? ⇒ Boolean
(also: #extract_to?, #extracted_towards?, #extract_to_this_directory?)
-
#extracting_compiling_or_installing? ⇒ Boolean
(also: #extracting_compiling_or_installing)
-
#fill_the_table(i) ⇒ Object
(also: #fill, #fill_with_this_array, #<<)
# === fill_the_table (fill tag).
-
#flatten_the_main_hash ⇒ Object
# === flatten_the_main_hash ========================================================================= #.
-
#has_to_be_compiled? ⇒ Boolean
# === has_to_be_compiled? ========================================================================= #.
-
#host_architecture? ⇒ Boolean
# === host_architecture? ========================================================================= #.
-
#initialize(commandline_arguments = nil, run_already = true, &block) ⇒ Flexbox
constructor
# === initialize ========================================================================= #.
-
#is_it_a_gem? ⇒ Boolean
# === is_it_a_gem? ========================================================================= #.
-
#keep_the_extracted_archive? ⇒ Boolean
(also: #keep_extracted?)
-
#left_pad? ⇒ Boolean
# === left_pad? ========================================================================= #.
-
#left_side? ⇒ Boolean
# === left_side? ========================================================================= #.
-
#location_to_the_build_directory? ⇒ Boolean
(also: #build_directory?)
# === location_to_the_build_directory? ========================================================================= #.
-
#menu(i = @commandline_arguments) ⇒ Object
-
#middle_ecliner ⇒ Object
# === middle_ecliner ========================================================================= #.
-
#parameters_to_make? ⇒ Boolean
# === parameters_to_make? ========================================================================= #.
-
#postinstall? ⇒ Boolean
# === postinstall?.
-
#preinstall? ⇒ Boolean
# === preinstall? ========================================================================= #.
-
#prepare_the_compile_dataset(i = @compile_this_program) ⇒ Object
(also: #set_use_this_as_dataset)
# === prepare_the_compile_dataset.
-
#prepare_the_flexbox_for_displaying_this_program(i) ⇒ Object
# === prepare_the_flexbox_for_displaying_this_program.
-
#program_path? ⇒ Boolean
# === program_path? ========================================================================= #.
-
#really_use_unicode? ⇒ Boolean
# === really_use_unicode? ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#return_combined_value_from_both_padding_values ⇒ Object
# === return_combined_value_from_both_padding_values ========================================================================= #.
-
#return_configure_options_or_meson_options_or_no_options ⇒ Object
-
#return_default_colour_for_this_input(i) ⇒ Object
-
#return_potentially_colourized_vertical_token ⇒ Object
# === return_potentially_colourized_vertical_token ========================================================================= #.
-
#return_vertical_bar ⇒ Object
# === return_vertical_bar.
-
#rev ⇒ Object
# === rev ========================================================================= #.
-
#right_pad? ⇒ Boolean
(also: #right_padding_size?, #right_padding?)
# === right_pad? ========================================================================= #.
-
#right_side? ⇒ Boolean
# === right_side? ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
-
#run_configure? ⇒ Boolean
-
#sanitize_right_side ⇒ Object
# === sanitize_right_side.
-
#set_commandline_arguments(i = '') ⇒ Object
# === set_commandline_arguments ========================================================================= #.
-
#set_compile_this_program(i = '') ⇒ Object
# === set_compile_this_program.
-
#set_do_this_action(i) ⇒ Object
(also: #set_do_what)
# === set_do_this_action ========================================================================= #.
-
#set_left_padding(i) ⇒ Object
# === set_left_padding ========================================================================= #.
-
#set_proper_padding_for_the_rbt_project ⇒ Object
# === set_proper_padding_for_the_rbt_project ========================================================================= #.
-
#set_right_padding(i) ⇒ Object
# === set_right_padding ========================================================================= #.
-
#set_show_required_dependencies(i) ⇒ Object
# === set_show_required_dependencies ========================================================================= #.
-
#set_use_this_title(i) ⇒ Object
(also: #set_use_title, #set_title, #title=)
# === set_use_this_title ========================================================================= #.
-
#title? ⇒ Boolean
# === title? ========================================================================= #.
-
#top_ecliner ⇒ Object
# === top_ecliner (top tag) ========================================================================= #.
-
#try_to_require_external_dependencies ⇒ Object
# === try_to_require_external_dependencies ========================================================================= #.
-
#type_in_use? ⇒ Boolean
# === type_in_use?.
-
#url1? ⇒ Boolean
# === url1? ========================================================================= #.
-
#use_autogen? ⇒ Boolean
# === use_autogen? ========================================================================= #.
-
#use_colours? ⇒ Boolean
# === use_colours? ========================================================================= #.
-
#use_default_colour_for_the_border ⇒ Object
# === use_default_colour_for_the_border.
-
#use_unicode? ⇒ Boolean
(also: #try_to_use_unicode_symbols_for_the_commandline_user_interface?)
# === use_unicode? ========================================================================= #.
-
#use_which_build_system? ⇒ Boolean
# === use_which_build_system? ========================================================================= #.
-
#verbose_truth(i) ⇒ Object
(also: #vt)
# === verbose_truth ========================================================================= #.
-
#vertical_bar? ⇒ Boolean
# === vertical_bar? ========================================================================= #.
Methods inherited from Base
animation_dir?, #animation_directory?, #clear_screen, #colour_parse_this_string, #debug?, #do_not_run_already, #do_not_use_clear, #do_use_random_colour, #do_wait_for_keypress_event, e, #e, #enable_debug, #is_animated?, #project_base_dir?, #register_sigint, #remove_trailing_ansci_escape_code, #report_how_many_animated_components_exist, #return_basename_of_this_file_without_the_extension, #return_random_colour, #royalblue, run, #set_use_this_colour, #sfancy, #sfile, #show_available_components, #show_help, #simp, #slategrey, #sort_files, #static_dir?, #steelblue, #swarn
Constructor Details
#initialize(commandline_arguments = nil, run_already = true, &block) ⇒ Flexbox
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 136
def initialize(
commandline_arguments = nil,
run_already = true,
&block
)
try_to_require_external_dependencies reset
set_commandline_arguments(
commandline_arguments
)
case run_already
when :do_not_run_yet
run_already = false
end
if block_given?
yielded = yield
if yielded.is_a? Hash
if yielded.has_key? :show_required_dependencies_on
set_show_required_dependencies(
yielded[:show_required_dependencies_on]
)
end
if yielded.has_key? :use_this_dataset
set_use_this_as_dataset(
yielded[:use_this_dataset]
)
end
if yielded.has_key? :do_what
set_do_what(
yielded[:do_what]
)
end
if yielded.has_key? :use_colours
@use_colours = yielded[:use_colours]
end
if yielded.has_key? :use_this_dataset
_ = yielded[:use_this_dataset]
prepare_the_compile_dataset(_)
end
end
end
run if run_already
end
|
Class Method Details
.[](i = '') ⇒ Object
#
AsciiParadise::Flexbox[]
#
759
760
761
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 759
def self.[](i = '')
new(i)
end
|
Instance Method Details
#add_this_to_the_right_padding(i) ⇒ Object
Also known as:
add_this_number_to_right_just
#
add_this_to_the_right_padding
#
449
450
451
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 449
def add_this_to_the_right_padding(i)
@n_right_pad += i
end
|
#autoexpand ⇒ Object
#
autoexpand (auto tag, autoexpand tag)
This method will try to automatically expand the left-pad and right-pad values if any individual entry is “too long”. It thus exists mostly as a convenience feature.
#
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 727
def autoexpand
left_side = @hash[:left_side]
max_n_left = left_side.map {|entry| entry.size }.max.to_i
if max_n_left > left_pad?
set_left_padding(max_n_left)
end
right_side = @hash[:right_side]
max_n_right = right_side.map {|entry| entry.to_s.size }.max.to_i
if max_n_right > right_pad?
set_right_padding(max_n_right+1)
end
end
|
#blfs? ⇒ Boolean
Also known as:
blfs_entry?
880
881
882
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 880
def blfs?
@compile_dataset.send(__method__) if @compile_dataset.respond_to?(__method__)
end
|
#bottom_ecliner ⇒ Object
617
618
619
620
621
622
623
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 617
def bottom_ecliner
result = cliner { :bottom }
if colourize_border?
result = Colours.send(@use_this_colour_for_the_border, result)
end
e " #{result}"
end
|
#clear_hash ⇒ Object
715
716
717
718
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 715
def clear_hash
@hash[:left_side].clear
@hash[:right_side].clear
end
|
#cliner(use_n_tokens = :default, use_this_token = :infer) ⇒ Object
#
cliner (cliner tag)
Specialized cliner-variant. It also responds to certain block arguments such as :top or :bottom.
#
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 502
def cliner(
use_n_tokens = :default,
use_this_token = :infer
)
case use_n_tokens
when :default
use_n_tokens = return_combined_value_from_both_padding_values
end
case use_this_token
when :infer
if really_use_unicode?
use_this_token = Roebe.horizontal_block
else
use_this_token = '-'
end
end
result = use_this_token * use_n_tokens
if block_given?
yielded = yield
case yielded
when :middle
result[0,1] = @vertical
result << @vertical
result[left_pad?+3,1] = @vertical
when :top
result[0,1] = Roebe.top_left_corner
result << Roebe.top_right_corner.dup
result[left_pad?+3,1] = Roebe.centerpiece_and_down
when :bottom
result[0,1] = Roebe.bottom_left_corner
result << Roebe.bottom_right_corner.dup
result[left_pad?+3,1] = Roebe.centerpiece_and_up
end
end
result
end
|
#colourize_border(use_this_colour = :default) ⇒ Object
Also known as:
set_border_colour
#
colourize_border
This method can be used to colourize the border.
#
335
336
337
338
339
340
341
342
343
344
345
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 335
def colourize_border(
use_this_colour = :default
)
case use_this_colour
when :default
use_this_colour = DEFAULT_COLOURS_FOR_RBT[:default_colour_for_the_border]
when :none
use_this_colour = nil
end
@use_this_colour_for_the_border = use_this_colour
end
|
#colourize_border? ⇒ Boolean
#
colourize_border
This method will return true if we shall colourize the border.
#
778
779
780
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 778
def colourize_border?
@use_colours and @use_this_colour_for_the_border
end
|
#colourize_right_side_with_these_colours(*i) ⇒ Object
#
colourize_right_side_with_these_colours
This method can be used to colourize the right-hand side of the table via a specific colour. This is currently simply a hardcoded Array. Perhaps one day we should transition into a Hash, but Arrays are simpler to use so we will stick with them for now.
If you wish to use the default colours here, use this:
colourize_right_side_with_these_colours :default
#
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 813
def colourize_right_side_with_these_colours(*i)
i.flatten!
if i.flatten.first == :default
i = %i(
cadetblue
mediumslateblue
paleturquoise
steelblue
slateblue
steelblue
royalblue
orchid
steelblue
royalblue
steelblue
steelblue
mediumseagreen
steelblue
steelblue
steelblue
steelblue
violet
)
end
@array_colourize_right_side_with_these_colours = i
end
|
#colourize_this_in_that_colour(this, that_colour = @use_this_colour_for_the_border) ⇒ Object
#
colourize_this_in_that_colour
The default colour will be the colour used for the border, if otherwise not specified.
#
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 314
def colourize_this_in_that_colour(
this,
that_colour = @use_this_colour_for_the_border
)
case that_colour
when nil, :default that_colour = @use_this_colour_for_the_border
end
if this and this.include? 'No CFLAGS in use.'
that_colour = :crimson end
if that_colour and this
Colours::HtmlColoursMethods.send(that_colour, this)
end
end
|
#colourize_this_via_the_default_border_colour(i) ⇒ Object
#
colourize_this_via_the_default_border_colour
#
350
351
352
353
354
355
356
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 350
def colourize_this_via_the_default_border_colour(i)
if @use_colours and @use_this_colour_for_the_border
return colourize_this_in_that_colour(i, @use_this_colour_for_the_border)
else
return i
end
end
|
#colourized_verbose_truth(i) ⇒ Object
#
colourized_verbose_truth
#
361
362
363
364
365
366
367
368
369
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 361
def colourized_verbose_truth(i)
_ = verbose_truth(i)
case _
when /^No./
return mediumorchid(_)
when /^Yes./
return royalblue(_)
end
end
|
#commandline_arguments? ⇒ Boolean
#
commandline_arguments?
#
492
493
494
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 492
def commandline_arguments?
@commandline_arguments
end
|
#compile_dataset? ⇒ Boolean
Also known as:
cookbook_dataset?, dataset?
1324
1325
1326
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1324
def compile_dataset?
@compile_dataset
end
|
#compile_this_program? ⇒ Boolean
Also known as:
input?
#
compile_this_program?
#
950
951
952
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 950
def compile_this_program?
@compile_this_program
end
|
#compiler_to_use? ⇒ Boolean
936
937
938
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 936
def compiler_to_use?
@compile_dataset.send(__method__).to_s
end
|
#content? ⇒ Boolean
#
content?
Show the original content.
#
383
384
385
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 383
def content?
[@hash[:left_side], @hash[:right_side]]
end
|
#disable_colours ⇒ Object
785
786
787
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 785
def disable_colours
@use_colours = false
end
|
#display ⇒ Object
Also known as:
show
#
display (display tag, report tag)
This is the method that will display the content of the flexbox-table.
You can style the colour of the border in one method call, such as by using:
flexbox.display {{ border: :steelblue }}
To not use any border-colouring, use this:
flexbox.display {{ border: :none }}
#
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1378
def display
left_pad = left_pad?
right_pad = right_pad?
vertical_bar = vertical_bar?
use_colours = use_colours?
if block_given?
yielded = yield
if yielded.is_a? Hash
if yielded.has_key? :border
set_border_colour(
yielded.delete(:border)
)
end
end
end
top_ecliner
right_side = right_side?
middle_ecliner
_return_potentially_colourized_vertical_token = return_potentially_colourized_vertical_token
left_side?.each_with_index {|left_side_content, index|
result = ' '.dup
result << _return_potentially_colourized_vertical_token
result << " #{rev}#{left_side_content.to_s.ljust(@n_left_pad)} "
right_side_content = right_side[index].to_s
case left_side_content
when /^Required dependencies on/
right_side_content.prepend('→ ')
end
if right_side_content.size > right_pad
splitted = ::AsciiParadise.wrap_at(right_side_content, 56).split("\n")
if !splitted.empty? and splitted.first and (splitted.first.count('--') > 1)
splitted = splitted.map {|inner_entry|
if inner_entry.include?('--')
inner_entry = inner_entry.split('--').map {|most_inner_entry|
"--#{most_inner_entry.strip}"
}.reject {|entry| entry == '--' }
end
inner_entry
}.flatten
end
index = 0
splitted.map! {|yet_another_entry| index += 1
if index == 1
"#{yet_another_entry.strip.ljust(@n_right_pad)}#{vertical_bar}\n"
elsif index == splitted.size
' '+vertical_bar+(' ' * (left_pad+2))+vertical_bar+' '+
yet_another_entry.strip.ljust(@n_right_pad)+"\n"
else
' '+vertical_bar+(' ' * (left_pad+2))+vertical_bar+' '+
yet_another_entry.strip.ljust(@n_right_pad)+
vertical_bar+
"\n"
end
}
right_side_content = splitted.join
right_side_content_properly_padded = right_side_content.chomp
else
right_side_content_properly_padded = right_side_content.ljust(@n_right_pad)
end
result << _return_potentially_colourized_vertical_token
if use_colours and !@array_colourize_right_side_with_these_colours.empty?
case left_side_content
when 'Required dependencies on:'
right_side_content_properly_padded = tomato(right_side_content_properly_padded)
when 'Program path:'
_ = right_side_content_properly_padded.split('/')
right_side_content_properly_padded = colourize_this_in_that_colour(
_[0 .. -2].join('/')+'/',
@array_colourize_right_side_with_these_colours[index]
)+royalblue(_.last)
else
that_colour = @array_colourize_right_side_with_these_colours[index]
right_side_content_properly_padded = colourize_this_in_that_colour(
right_side_content_properly_padded,
that_colour
)
end
end
result << ' '+
right_side_content_properly_padded.to_s result << _return_potentially_colourized_vertical_token
e result
}
middle_ecliner
bottom_ecliner
end
|
#do_what=(i = 'Compiling') ⇒ Object
#
do_what=
This method can be used to determine which action is to be done.
Available actions are:
- compiling
-
- installing
#
680
681
682
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 680
def do_what=(i = 'Compiling')
@do_this_action = i
end
|
#does_the_program_have_to_be_compiled? ⇒ Boolean
#
does_the_program_have_to_be_compiled?
#
866
867
868
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 866
def does_the_program_have_to_be_compiled?
@compile_dataset.send(__method__)
end
|
#ecliner ⇒ Object
628
629
630
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 628
def ecliner
e cliner
end
|
#empty? ⇒ Boolean
#
empty?
This method will determine whether the Flexbox is empty or not, that is whether it contains data or whether it currently holds no data.
#
393
394
395
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 393
def empty?
@hash[:left_side].empty? and @hash[:right_side].empty?
end
|
#enable_rbt_specific_behaviour ⇒ Object
#
enable_rbt_specific_behaviour
#
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 986
def enable_rbt_specific_behaviour
@shall_we_autoexpand = false
set_proper_padding_for_the_rbt_project
use_this_title = "Infobox"
set_title(use_this_title)
dataset = compile_dataset?
return if dataset.nil?
array = []
@do_this_action = if
'Extracting'
elsif has_to_be_compiled?
'Compiling'
else
'Installing'
end
array << "#{} this program:"
array << dataset.query_for(array.last)
array << "Assumed Operating System:"
array << dataset.query_for(array.last)
unless is_it_a_gem?
array << 'Prefix:'
array << dataset.query_for(array.last)
end if program_path?
array << 'Program version:'
array << dataset.query_for(array.last)
array << 'Program path:'
array << dataset.query_for(array.last)
configure_options = return_configure_options_or_meson_options_or_no_options
unless configure_options.empty?
array << 'configure options:'
array << configure_options
end if configure_options
array << 'Will be extracted towards:'
array << .to_s
unless is_it_a_gem?
array << 'Keep the archive extracted:'
array <<
end
array << 'Will ccache be used:'
array << dataset.query_for(array.last)
if does_the_program_have_to_be_compiled?
array << 'Compiler to be used:'
array << compiler_to_use?
end
if does_the_program_have_to_be_compiled?
array << 'CFLAGS in use:'
array << dataset.query_for(array.last)
end
if dataset.build_static?
array << 'Compile statically:'
array << "#{vt(dataset.build_static?.to_s)}."
end
array << 'Use a build directory:'
_ = dataset.query_for(array.last)
if _
_ = "#{verbose_truth(_.to_s)}, at #{build_directory?}"
elsif _.is_a? FalseClass
_ = verbose_truth(_.to_s)+'.'
end
array << _
preinstall = preinstall?
if preinstall and preinstall.is_a?(Array) and !preinstall.empty?
array << 'Preinstallation action:'
_ = preinstall.join(', ').strip
_.chop! if _.end_with? ','
array << _
end
postinstall = postinstall?
if postinstall and postinstall.is_a?(Array) and !postinstall.empty?
array << 'Postinstallation action:'
_ = postinstall.join(', ').strip
_.chop! if _.end_with? ','
array << _
end
array << 'Host architecture in use'
array << host_architecture?
use_autogen = use_autogen?
if use_autogen
array << 'Use autogen:'
array << "#{verbose_truth(use_autogen)}."
end
array << 'Build system to be used:'
use_this_build_system = use_which_build_system?
if (run_configure? == false) and (use_this_build_system == 'configure')
use_this_build_system = '(unknown / unspecified)'
end
array << use_this_build_system
parameters_to_make = parameters_to_make?
if parameters_to_make.respond_to? :reject
unless parameters_to_make.reject {|entry| entry.nil? or entry.empty? }.empty?
joined = parameters_to_make
if joined.is_a? Array
joined = joined.join(',').strip
end
joined.chop! if joined.end_with? ','
array << 'Parameters for make:'
array << parameters_to_make end
end
array << 'Type in use:'
array << type_in_use?
if @show_remote_urls
url1 = url1?
if url1 and ((url1.size+1) > right_padding_size?)
add_n = ( url1.size - right_padding_size? )+1
if (add_n + right_padding?) > MAX_VALUE_FOR_PADDING
add_n = (MAX_VALUE_FOR_PADDING - right_padding?) - 1
end
add_this_to_the_right_padding(
add_n
)
end
array << 'URL to the source archive:'
array << url1
blfs_URL = blfs?
if blfs_URL and !blfs_URL.empty?
array << 'BLFS entry:'
array << blfs_URL
end
value_for_the_homepage_entry = dataset.query_for('Homepage:')
if value_for_the_homepage_entry and !value_for_the_homepage_entry.empty?
array << 'Homepage:'
homepage = value_for_the_homepage_entry
if homepage.nil? or homepage.empty?
homepage = '[No homepage entry has been registered for this program.]'
end
array << homepage
end
end
if @show_required_dependencies
_ = 'Required dependencies on:'
deps = dataset.query_for(_)
if deps and !deps.empty?
array << _
if deps.respond_to? :join
array << deps.join(', ').strip.to_s
end
end
end
fill_with_this_array(array) use_default_colour_for_the_border
colourize_right_side_with_these_colours :default
sanitize_right_side
end
|
1308
1309
1310
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1308
def
@compile_dataset.send(__method__)
end
|
1602
1603
1604
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1602
def
@compile_dataset.query_for(__method__)
end
|
#
This method will return one of three possible, different strings.
#
664
665
666
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 664
def
@do_this_action
end
|
#fill_the_table(i) ⇒ Object
Also known as:
fill, fill_with_this_array, <<
#
fill_the_table (fill tag)
The input to this method should be an Array.
This is the main “fill” method for passing data into the flexbox-table.
The input can be a String as well, in which case this method may process the input String and turn it into an Array.
#
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1543
def fill_the_table(i)
clear_hash if i.is_a?(String) and
(i.count("\n") > 1) and i.include?(VERTICAL_ASCII_BAR) i = i.split(VERTICAL_ASCII_BAR).map {|entry| entry.strip }
end
even = i.select.with_index { |_, entry| entry.even? }
odd = i.select.with_index { |_, entry| entry.odd? }
@hash[:left_side] << even
@hash[:right_side] << odd
flatten_the_main_hash
autoexpand if @shall_we_autoexpand
end
|
#flatten_the_main_hash ⇒ Object
#
flatten_the_main_hash
#
441
442
443
444
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 441
def flatten_the_main_hash
@hash[:left_side].flatten!
@hash[:right_side].flatten!
end
|
#has_to_be_compiled? ⇒ Boolean
922
923
924
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 922
def has_to_be_compiled?
@compile_dataset.send(__method__)
end
|
#host_architecture? ⇒ Boolean
901
902
903
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 901
def host_architecture?
@compile_dataset.send(__method__)
end
|
#is_it_a_gem? ⇒ Boolean
943
944
945
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 943
def is_it_a_gem?
program_path? and program_path?.end_with?('.gem')
end
|
915
916
917
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 915
def
@compile_dataset.send(__method__)
end
|
#left_pad? ⇒ Boolean
687
688
689
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 687
def left_pad?
@n_left_pad
end
|
#left_side? ⇒ Boolean
1529
1530
1531
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1529
def left_side?
@hash[:left_side]
end
|
#location_to_the_build_directory? ⇒ Boolean
Also known as:
build_directory?
#
location_to_the_build_directory?
#
843
844
845
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 843
def location_to_the_build_directory?
@compile_dataset.send(__method__)
end
|
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1332
def (
i = @commandline_arguments
)
if i.is_a? Array
i.each {|entry| (entry) }
else
if Object.const_defined?(:RBT) and
(
RBT.const_defined?(:Installer) or
RBT.const_defined?(:Compile)
)
prepare_the_flexbox_for_displaying_this_program(i)
end
end
end
|
#middle_ecliner ⇒ Object
560
561
562
563
564
565
566
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 560
def middle_ecliner
result = cliner(:default, ' ') { :middle }
if colourize_border?
result = Colours::HtmlColoursMethods.send(@use_this_colour_for_the_border, result)
end
e " #{result}"
end
|
#parameters_to_make? ⇒ Boolean
971
972
973
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 971
def parameters_to_make?
@compile_dataset.parameters_to_make?
end
|
#postinstall? ⇒ Boolean
#
postinstall?
Note that this will typically be an Array.
#
859
860
861
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 859
def postinstall?
@compile_dataset.send(__method__)
end
|
#preinstall? ⇒ Boolean
850
851
852
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 850
def preinstall?
@compile_dataset.send(__method__)
end
|
#prepare_the_compile_dataset(i = @compile_this_program) ⇒ Object
Also known as:
set_use_this_as_dataset
#
prepare_the_compile_dataset
This very important method will initialize the @compile_dataset object. This dataset is the one that will be displayed by class Flexbox ultimately.
#
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1573
def prepare_the_compile_dataset(
i = @compile_this_program
)
if Object.const_defined?(:RBT) @compile_dataset = i.dup
enable_rbt_specific_behaviour
elsif i.is_a?(String) and RBT.is_this_program_included?(i)
@compile_dataset = RBT::Installer.new(i) { :do_not_run_yet }
elsif i.is_a?(String) i = RBT::Cookbooks::SanitizeCookbook.new(i)
else
if i
@compile_dataset = i
else
e "Unhandled state: #{i}"
end
end
end
|
#prepare_the_flexbox_for_displaying_this_program(i) ⇒ Object
#
prepare_the_flexbox_for_displaying_this_program
This method can be used to prepare data fed into the Flexbox from the RBT project, for display purposes on the commandline. This data may typically describe how a certain application is to be installed/compiled.
In fact - this was the primary use case for creating the Flexbox class to begin with.
#
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1294
def prepare_the_flexbox_for_displaying_this_program(i)
require 'rbt/requires/require_the_cookbook_class.rb'
require 'rbt/requires/require_the_installer_class.rb'
set_compile_this_program(i)
enable_rbt_specific_behaviour
end
|
#program_path? ⇒ Boolean
908
909
910
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 908
def program_path?
@compile_dataset.send(__method__)
end
|
#really_use_unicode? ⇒ Boolean
427
428
429
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 427
def really_use_unicode?
use_unicode? and Object.const_defined?(:Roebe)
end
|
#reset ⇒ Object
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 204
def reset
super()
@namespace = NAMESPACE
@compile_dataset = nil
@show_required_dependencies = true
if TRY_TO_USE_UNICODE_SYMBOLS_FOR_THE_COMMANDLINE_USER_INTERFACE
@use_unicode_or_ascii = :unicode
else
@use_unicode_or_ascii = :ascii
end
@n_left_pad = 15
@n_right_pad = 25
@vertical = return_vertical_bar
@do_this_action = 'Compiling'
@show_remote_urls = SHOW_REMOTE_URLS_BY_DEFAULT
@use_colours = true
@shall_we_autoexpand = true
@array_colourize_right_side_with_these_colours = []
@use_this_colour_for_the_border = nil
@use_this_title = nil
@hash = {}
@hash[:left_side] = []
@hash[:right_side] = []
end
|
#return_combined_value_from_both_padding_values ⇒ Object
#
return_combined_value_from_both_padding_values
#
468
469
470
471
472
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 468
def return_combined_value_from_both_padding_values
@n_left_pad+
@n_right_pad+
5
end
|
1611
1612
1613
1614
1615
1616
1617
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1611
def return_configure_options_or_meson_options_or_no_options
if @compile_dataset.use_configure_options?
@compile_dataset.query_for_configure_options_or_meson_options('configure options:')
else
false
end
end
|
302
303
304
305
306
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 302
def return_default_colour_for_this_input(i)
colourize_this_in_that_colour(
i, DEFAULT_COLOURS_FOR_RBT[:default_colour]
)
end
|
#return_potentially_colourized_vertical_token ⇒ Object
#
return_potentially_colourized_vertical_token
#
644
645
646
647
648
649
650
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 644
def return_potentially_colourized_vertical_token
_ = @vertical
if colourize_border?
_ = Colours::HtmlColoursMethods.send(@use_this_colour_for_the_border, _)
end
_
end
|
#return_vertical_bar ⇒ Object
#
return_vertical_bar
This will return a vertical bar, e. g. either ‘|’, or the corresponding Unicode representation - the latter of which is done through the Roebe namespace.
#
416
417
418
419
420
421
422
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 416
def return_vertical_bar
if really_use_unicode?
Roebe.vertical_block
else
VERTICAL_ASCII_BAR
end
end
|
#rev ⇒ Object
792
793
794
795
796
797
798
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 792
def rev
if @use_colours
Colours.rev
else
''
end
end
|
#right_pad? ⇒ Boolean
Also known as:
right_padding_size?, right_padding?
751
752
753
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 751
def right_pad?
@n_right_pad
end
|
#right_side? ⇒ Boolean
477
478
479
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 477
def right_side?
@hash[:right_side]
end
|
#run ⇒ Object
1622
1623
1624
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1622
def run
end
|
873
874
875
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 873
def run_configure?
@compile_dataset.send(__method__)
end
|
#sanitize_right_side ⇒ Object
#
sanitize_right_side
This method is currently only used to replace true/false boolean values with verbose “Yes.” or “No.” strings.
#
603
604
605
606
607
608
609
610
611
612
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 603
def sanitize_right_side
@hash[:right_side].map! {|entry|
if entry.is_a? TrueClass
entry = 'Yes.'
elsif entry.is_a? FalseClass
entry = 'No.'
end
entry
}
end
|
#set_commandline_arguments(i = '') ⇒ Object
#
set_commandline_arguments
#
484
485
486
487
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 484
def set_commandline_arguments(i = '')
i = [i].flatten.compact
@commandline_arguments = i
end
|
#set_compile_this_program(i = '') ⇒ Object
#
set_compile_this_program
This will assign to the program to be used; it should be an instance of the main data-loader class.
#
1357
1358
1359
1360
1361
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1357
def set_compile_this_program(i = '')
i = i.first if i.is_a? Array
i = i.dup
@compile_this_program = i
end
|
#set_do_this_action(i) ⇒ Object
Also known as:
set_do_what
964
965
966
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 964
def set_do_this_action(i)
@do_this_action = i
end
|
#set_left_padding(i) ⇒ Object
694
695
696
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 694
def set_left_padding(i)
@n_left_pad = i.to_i
end
|
#set_proper_padding_for_the_rbt_project ⇒ Object
#
set_proper_padding_for_the_rbt_project
#
#set_right_padding(i) ⇒ Object
701
702
703
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 701
def set_right_padding(i)
@n_right_pad = i.to_i
end
|
#set_show_required_dependencies(i) ⇒ Object
#
set_show_required_dependencies
#
957
958
959
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 957
def set_show_required_dependencies(i)
@show_required_dependencies = i
end
|
#set_use_this_title(i) ⇒ Object
Also known as:
set_use_title, set_title, title=
635
636
637
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 635
def set_use_this_title(i)
@use_this_title = i
end
|
#title? ⇒ Boolean
708
709
710
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 708
def title?
@use_this_title
end
|
#top_ecliner ⇒ Object
#
top_ecliner (top tag)
#
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 571
def top_ecliner
result = cliner { :top }
title = title?
if title
result[1, title.size+2] = " #{title} "
end
if colourize_border?
if title splitted = result.split(' ')
splitted[0] = Colours::HtmlColoursMethods.send(@use_this_colour_for_the_border, splitted[0])
splitted[1] = Colours::HtmlColoursMethods.send(COLOUR_FOR_THE_TITLE, splitted[1])
splitted[2] = Colours::HtmlColoursMethods.send(@use_this_colour_for_the_border, splitted[2])
result = splitted.join(' ')
else
result = Colours::HtmlColoursMethods.send(@use_this_colour_for_the_border, result)
end
end
e " #{rev}#{result}"
end
|
#try_to_require_external_dependencies ⇒ Object
#
try_to_require_external_dependencies
#
456
457
458
459
460
461
462
463
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 456
def try_to_require_external_dependencies
begin
require 'roebe/toplevel_methods/unicode/popular_unicode_symbols.rb'
rescue LoadError; end
begin
require 'rbt/toplevel_methods/available_programs.rb'
rescue LoadError; end
end
|
#type_in_use? ⇒ Boolean
#
type_in_use?
This is a bit special in that it will display a fake “Symbol”.
#
1317
1318
1319
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 1317
def type_in_use?
":#{@compile_dataset.send(__method__).to_s}"
end
|
#url1? ⇒ Boolean
887
888
889
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 887
def url1?
@compile_dataset.send(__method__)
end
|
#use_autogen? ⇒ Boolean
929
930
931
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 929
def use_autogen?
@compile_dataset.send(__method__)
end
|
#use_colours? ⇒ Boolean
374
375
376
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 374
def use_colours?
@use_colours
end
|
#use_default_colour_for_the_border ⇒ Object
#
use_default_colour_for_the_border
This method can be used to use the default colour for the border, which is currently :slateblue.
#
769
770
771
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 769
def use_default_colour_for_the_border
colourize_border :default
end
|
#use_unicode? ⇒ Boolean
Also known as:
try_to_use_unicode_symbols_for_the_commandline_user_interface?
434
435
436
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 434
def use_unicode?
@use_unicode_or_ascii == :unicode
end
|
#use_which_build_system? ⇒ Boolean
#
use_which_build_system?
#
894
895
896
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 894
def use_which_build_system?
@compile_dataset.send(__method__)
end
|
#verbose_truth(i) ⇒ Object
Also known as:
vt
400
401
402
403
404
405
406
407
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 400
def verbose_truth(i)
case i.to_s
when 'true'
'Yes'
when 'false'
'No'
end
end
|
#vertical_bar? ⇒ Boolean
655
656
657
|
# File 'lib/ascii_paradise/flexbox/flexbox.rb', line 655
def vertical_bar?
@vertical
end
|