Class: AsciiParadise::Ponies

Inherits:
Base
  • Object
show all
Defined in:
lib/ascii_paradise/static_ascii/ponies.rb

Overview

AsciiParadise::Ponies

Constant Summary collapse

SEPARATOR =
#

SEPARATOR

In order for this separator-constant to work, the file needs to have at the least two “nn” in series.

#
"\n\n"
FILE_PONIES =
#

FILE_PONIES

#
"#{::AsciiParadise.static_dir?}ponies.ascii"
ALL_PONIES =
#

AsciiParadise::ALL_PONIES

Obtain all ponies next.

#
File.readlines(
  FILE_PONIES, SEPARATOR
)

Instance Method Summary collapse

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?, #menu, #project_base_dir?, #register_sigint, #remove_trailing_ansci_escape_code, #report_how_many_animated_components_exist, #reset, #return_basename_of_this_file_without_the_extension, #return_random_colour, #rev, #royalblue, run, #set_use_this_colour, #sfancy, #sfile, #show_available_components, #show_help, #simp, #slategrey, #sort_files, #static_dir?, #steelblue, #swarn, #use_colours?

Constructor Details

#initializePonies

#

initialize

#


40
41
42
43
# File 'lib/ascii_paradise/static_ascii/ponies.rb', line 40

def initialize
  super()
  puts ALL_PONIES.sample # Obtain a random pony. .readlines() will use "\n\n" as splitter.
end