{P: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[ o:$YARD::CodeObjects::ModuleObject;IC;[ o:#YARD::CodeObjects::ClassObject;IC;[ o:$YARD::CodeObjects::MethodObject:@module_functionF: @scope: instance:@visibility: public: @pathI"CLIUtils::Prefs#answers:EF:@parameters[: @files[[I"lib/cliutils/prefs.rb;Ti:@current_file_has_commentsT: @name: answers:@source_type: ruby: @tags[:@docstrings{:@docstringIC:YARD::Docstring"{==================================================== Attributes ==================================================== ;T:@ref_tags[;[: @allI"| ==================================================== Attributes ====================================================;T:@unresolved_reference0: @object@ :@hash_flagF:@line_rangeo: Range: exclF: begini:endi:@namespace@ : @sourceI"def answers @answers end;T:@signatureI"def answers;T: @dynamicTo; ; F; ;;;;I" CLIUtils::Prefs#config_path;F;[;[[@i;T;:config_path;;;[;{;IC;"{==================================================== Attributes ==================================================== ;T;[;[;@; 0;!@;"F;#@;(@ ;)I"'def config_path @config_path end;T;*I"def config_path;T;+To; ; F; ;;;;I"CLIUtils::Prefs#prompts;F;[;[[@i;T;: prompts;;;[;{;IC;"{==================================================== Attributes ==================================================== ;T;[;[;@; 0;!@';"F;#@;(@ ;)I"def prompts @prompts end;T;*I"def prompts;T;+To; ; F; ;;;;I"CLIUtils::Prefs#initialize;F;[[I" data;T0;[[@i;T;:initialize;;;[;{;IC;"$==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Reads prompt data from YAML file. @return Void ---------------------------------------------------- ;T;[;[o:YARD::Tags::Tag :@tag_nameI" return;F: @textI"a new instance of Prefs;T;0: @types[I" Prefs;F;!@3;I"% ==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Reads prompt data from YAML file. @return Void ----------------------------------------------------;T; 0;!@3;"F;#o;$;%F;&i;'i;(@ ;)I"def initialize(data) @answers = [] @prompts = {} case data when String if File.exists?(data) @config_path = data prompts = YAML::load_file(data) @prompts.deep_merge!(prompts).deep_symbolize_keys! else fail "Invalid configuration file: #{ yaml_path }" end when Array @config_path = nil prompts = {:prompts => data} @prompts.deep_merge!(prompts).deep_symbolize_keys! else fail 'Invalid configuration data' end end;T;*I"def initialize(data);T;+T:@explicitTo; ; F; ;;;;I"CLIUtils::Prefs#ask;F;[;[[@i>;T;:ask;;;[;{;IC;"T---------------------------------------------------- ask method Runs through all of the prompt questions and collects answers from the user. Note that all questions w/o requirements are examined first; once those are complete, questions w/ requirements are examined. @return Void ---------------------------------------------------- ;T;[;[;I"U ---------------------------------------------------- ask method Runs through all of the prompt questions and collects answers from the user. Note that all questions w/o requirements are examined first; once those are complete, questions w/ requirements are examined. @return Void ----------------------------------------------------;T; 0;!@H;"F;#o;$;%F;&i5;'i=;(@ ;)I"def ask @prompts[:prompts].reject { |p| p[:requirements] }.each do |p| _deliver_prompt(p) end @prompts[:prompts].find_all { |p| p[:requirements] }.each do |p| _deliver_prompt(p) if _requirements_fulfilled?(p) end end;T;*I" def ask;T;+T;3To; ; F; ;;: private;I"$CLIUtils::Prefs#_deliver_prompt;F;[[I"p;T0;[[@iR;T;:_deliver_prompt;;;[;{;IC;"---------------------------------------------------- _deliver_prompt method Utility method for prompting the user to answer the question (taking into account any options). @param p The prompt @return Void ---------------------------------------------------- ;T;[;[;I"  ---------------------------------------------------- _deliver_prompt method Utility method for prompting the user to answer the question (taking into account any options). @param p The prompt @return Void ----------------------------------------------------;T; 0;!@V;"F;#o;$;%F;&iJ;'iQ;(@ ;)I"def _deliver_prompt(p) if p[:options].nil? pref = prompt(p[:prompt], p[:default]) else valid_option_chosen = false until valid_option_chosen pref = prompt(p[:prompt], p[:default]) if p[:options].include?(pref) valid_option_chosen = true else error("Invalid option chosen: #{ pref }") end end end p[:answer] = pref @answers << p end;T;*I"def _deliver_prompt(p);T;+T;3To; ; F; ;;;5;I"-CLIUtils::Prefs#_requirements_fulfilled?;F;[[I"p;T0;[[@im;T;:_requirements_fulfilled?;;;[;{;IC;" ---------------------------------------------------- _requirements_fulfilled? method Utility method for determining whether a prompt's requirements have already been fulfilled. @param p The prompt @return Void ---------------------------------------------------- ;T;[;[o;/ ;0I" return;F;1I";T;0;2[I" Boolean;T;!@f;I" ---------------------------------------------------- _requirements_fulfilled? method Utility method for determining whether a prompt's requirements have already been fulfilled. @param p The prompt @return Void ----------------------------------------------------;T; 0;!@f;"F;#o;$;%F;&ie;'il;(@ ;)I"def _requirements_fulfilled?(p) ret = true p[:requirements].each do |req| a = @answers.detect do |answer| answer[:key] == req[:key] && answer[:answer] == req[:value] end ret = false if a.nil? end ret end;T;*I"$def _requirements_fulfilled?(p);T;+T;3T: @owner@ :@class_mixinsIC;[;8@ :@instance_mixinsIC;[o:YARD::CodeObjects::Proxy : @imethod0:@origname0:@orignamespace0;: PrettyIO;(@: @objo; ;IC;[o:+YARD::CodeObjects::ClassVariableObject;[[I"lib/cliutils/pretty-io.rb;Ti;F;: @@wrap;;;;;[;{;IC;" ;T;!@{: @summary0;"F;[;[;I";T; 0;(@~;I"CLIUtils::PrettyIO::@@wrap;F;*I"@@wrap = true;T;)I"@@wrap = true;T: @valueI" true;T;+To;A;[[@~i;F;:@@wrap_char_limit;;;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@~;I"*CLIUtils::PrettyIO::@@wrap_char_limit;F;*I"@@wrap_char_limit = 40;T;)I"@@wrap_char_limit = 40;T;DI"40;T;+To; ; F; : class;;;I" CLIUtils::PrettyIO.included;F;[[I"k;T0;[[@~i";T;: included;;;[;{;IC;"z==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ---------------------------------------------------- ;T;[;[;I"{ ==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i!;(@~;)I".def self.included(k) k.extend(self) end;T;*I"def self.included(k);T;+T;3To; ; F; ;;;;I"#CLIUtils::PrettyIO#color_chart;F;[;[[@~i-;T;:color_chart;;;[;{;IC;"---------------------------------------------------- color_chart method Displays a chart of all the possible ANSI foreground and background color combinations. @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- color_chart method Displays a chart of all the possible ANSI foreground and background color combinations. @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i&;'i,;(@~;)I"Bdef color_chart [0, 1, 4, 5, 7].each do |attr| puts '----------------------------------------------------------------' puts "ESC[#{attr};Foreground;Background" 30.upto(37) do |fg| 40.upto(47) do |bg| print "\033[#{attr};#{fg};#{bg}m #{fg};#{bg} " end puts "\033[0m" end end end;T;*I"def color_chart;T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#debug;F;[[I"m;T0;[[@~iA;T;: debug;;;[;{;IC;"---------------------------------------------------- debug method Empty method so that Messenging doesn't freak out when passed a debug message. @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- debug method Empty method so that Messenging doesn't freak out when passed a debug message. @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i:;'i@;(@~;)I"def debug(m); end;T;*I"def debug(m); end;T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#error;F;[[I"m;T0;[[@~iJ;T;: error;;;[;{;IC;"---------------------------------------------------- error method Outputs a formatted-red error message. @param m The message to output @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- error method Outputs a formatted-red error message. @param m The message to output @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iC;'iI;(@~;)I"4def error(m) puts _word_wrap(m, '# ').red end;T;*I"def error(m);T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#info;F;[[I"m;T0;[[@~iU;T;: info;;;[;{;IC;"---------------------------------------------------- info method Outputs a formatted-blue informational message. @param m The message to output @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- info method Outputs a formatted-blue informational message. @param m The message to output @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iN;'iT;(@~;)I"4def info(m) puts _word_wrap(m, '# ').blue end;T;*I"def info(m);T;+T;3To; ; F; ;;;;I""CLIUtils::PrettyIO#info_block;F;[[I"m1;T0[I"m2;TI" 'Done.';T[I"multiline;TI" false;T;[[@~ib;T;:info_block;;;[;{;IC;"O---------------------------------------------------- info_block method Wraps a block in an opening and closing info message. @param m1 The opening message to output @param m2 The closing message to output @param multiline Whether the message should be multiline @return Void ---------------------------------------------------- ;T;[;[;I"P ---------------------------------------------------- info_block method Wraps a block in an opening and closing info message. @param m1 The opening message to output @param m2 The closing message to output @param multiline Whether the message should be multiline @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iY;'ia;(@~;)I"8def info_block(m1, m2 = 'Done.', multiline = false) if block_given? if multiline info(m1) else print _word_wrap(m1, '# ').blue end yield if multiline info(m2) else puts _word_wrap(m2, '# ').blue end else fail 'Did not specify a valid block' end end;T;*I"8def info_block(m1, m2 = 'Done.', multiline = false);T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#log;F;[[I"m;T0;[[@~i};T;:log;;;[;{;IC;"---------------------------------------------------- log method Empty method so that Messenging doesn't freak out when passed a debug message. @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- log method Empty method so that Messenging doesn't freak out when passed a debug message. @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iv;'i|;(@~;)I"def log(m); end;T;*I"def log(m); end;T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#prompt;F;[[I" prompt;T0[I" default;TI"nil;T[I"start_dir;TI"'';T;[[@~i;T;: prompt;;;[;{;IC;"---------------------------------------------------- prompt method Outputs a prompt, collects the user's response, and returns it. @param prompt The prompt to output @param default The default option @return String ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- prompt method Outputs a prompt, collects the user's response, and returns it. @param prompt The prompt to output @param default The default option @return String ----------------------------------------------------;T; 0;!@ ;"F;#o;$;%F;&i;'i;(@~;)I"def prompt(prompt, default = nil, start_dir = '') Readline.completion_append_character = nil Readline.completion_proc = lambda do |prefix| files = Dir["#{start_dir}#{prefix}*"] files. map { |f| File.expand_path(f) }. map { |f| File.directory?(f) ? f + "/" : f } end choice = Readline.readline("# #{ prompt }#{ default.nil? ? ':' : " [default: #{ default }]:" } ".cyan) if choice.empty? default else choice end end;T;*I"6def prompt(prompt, default = nil, start_dir = '');T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#section;F;[[I"m;T0;[[@~i;T;: section;;;[;{;IC;"---------------------------------------------------- section method Outputs a formatted-purple section message. @param m The message to output @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- section method Outputs a formatted-purple section message. @param m The message to output @return Void ----------------------------------------------------;T; 0;!@ ;"F;#o;$;%F;&i;'i;(@~;)I" ').purple end;T;*I"def section(m);T;+T;3To; ; F; ;;;;I"%CLIUtils::PrettyIO#section_block;F;[[I"m;T0[I"multiline;TI" true;T;[[@~i;T;:section_block;;;[;{;IC;"I---------------------------------------------------- section_block method Wraps a block in an opening and closing section message. @param m1 The opening message to output @param m2 The closing message to output @param multiline A multiline message or not @return Void ---------------------------------------------------- ;T;[;[;I"J ---------------------------------------------------- section_block method Wraps a block in an opening and closing section message. @param m1 The opening message to output @param m2 The closing message to output @param multiline A multiline message or not @return Void ----------------------------------------------------;T; 0;!@0;"F;#o;$;%F;&i;'i;(@~;)I"def section_block(m, multiline = true) if block_given? if multiline section(m) else print _word_wrap(m, '---> ').purple end yield else fail 'Did not specify a valid block' end end;T;*I"+def section_block(m, multiline = true);T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#success;F;[[I"m;T0;[[@~i;T;: success;;;[;{;IC;"---------------------------------------------------- success method Outputs a formatted-green success message. @param m The message to output @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- success method Outputs a formatted-green success message. @param m The message to output @return Void ----------------------------------------------------;T; 0;!@C;"F;#o;$;%F;&i;'i;(@~;)I"8def success(m) puts _word_wrap(m, '# ').green end;T;*I"def success(m);T;+T;3To; ; F; ;;;;I"CLIUtils::PrettyIO#warn;F;[[I"m;T0;[[@~i;T;: warn;;;[;{;IC;"---------------------------------------------------- warning method Outputs a formatted-yellow warning message. @param m The message to output @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- warning method Outputs a formatted-yellow warning message. @param m The message to output @return Void ----------------------------------------------------;T; 0;!@S;"F;#o;$;%F;&i;'i;(@~;)I"6def warn(m) puts _word_wrap(m, '# ').yellow end;T;*I"def warn(m);T;+T;3To; ; F; ;F;;;I"CLIUtils::PrettyIO.wrap;F;[[I"on;T0;[[@~i;T;: wrap;;;[;{;IC;"---------------------------------------------------- wrap method Toggles wrapping on or off @return Integer ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- wrap method Toggles wrapping on or off @return Integer ----------------------------------------------------;T; 0;!@c;"F;#o;$;%F;&i;'i;(@~;)I"(def self.wrap(on) @@wrap = on end;T;*I"def self.wrap(on);T;+T;3To; ; F; ;F;;;I""CLIUtils::PrettyIO.wrap_limit;F;[;[[@~i;T;:wrap_limit;;;[;{;IC;"---------------------------------------------------- wrap_limit method Returns the current character wrap amount @return Integer ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- wrap_limit method Returns the current character wrap amount @return Integer ----------------------------------------------------;T; 0;!@s;"F;#o;$;%F;&i;'i;(@~;)I"0def self.wrap_limit @@wrap_char_limit end;T;*I"def self.wrap_limit;T;+T;3To; ; F; ;F;;;I"CLIUtils::PrettyIO.wrap_at;F;[[I" chars;T0;[[@~i;T;: wrap_at;;;[;{;IC;"---------------------------------------------------- wrap_at method Sets the number of characters at which to wrap @return Integer ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- wrap_at method Sets the number of characters at which to wrap @return Integer ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i;(@~;)I"0;: Object;(@;@0;\;F;+To:&YARD::CodeObjects::ConstantObject;[[I"lib/cliutils/version.rb;Ti;F;: VERSION;;;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@;I"CLIUtils::VERSION;F;*I"VERSION = "1.0.0";T;)I"VERSION = "1.0.0";T;DI" "1.0.0";T;+T@~o; ;IC;[o; ; F; ;F;;;I""CLIUtils::Messenging.included;F;[[I"k;T0;[[I"lib/cliutils/messenging.rb;Ti;T;;G;;;[;{;IC;"x==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ---------------------------------------------------- ;T;[;[;I"y ==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i;(@;)I".def self.included(k) k.extend(self) end;T;*I"def self.included(k);T;+T;3To; ; F; ;;;;I"*CLIUtils::Messenging#default_instance;F;[;[[@i$;T;:default_instance;;;[;{;IC;"---------------------------------------------------- default_instance method Returns a default instance of LoggerDelegator that delegates to STDOUT only. @return LoggerDelegator ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- default_instance method Returns a default instance of LoggerDelegator that delegates to STDOUT only. @return LoggerDelegator ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i#;(@;)I"def default_instance stdout_logger = Logger.new(STDOUT) stdout_logger.formatter = proc do |severity, datetime, progname, msg| send(severity.downcase, msg) end LoggerDelegator.new(stdout_logger) end;T;*I"def default_instance;T;+T;3To; ; F; ;;;;I"#CLIUtils::Messenging#messenger;F;[;[[@i4;T;:messenger;;;[;{;IC;"---------------------------------------------------- messenger method Singleton method to return (or initialize, if needed) a LoggerDelegator. @return LoggerDelegator ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- messenger method Singleton method to return (or initialize, if needed) a LoggerDelegator. @return LoggerDelegator ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i-;'i3;(@;)I"8def messenger @messenger ||= default_instance end;T;*I"def messenger;T;+T;3T;8@;9IC;[;8@;:IC;[o;; ;<0;=I"CLIUtils::PrettyIO;T;>@;;?;(@;@@~;\;];8@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;:Messenging;;;;;[;{;IC;"====================================================== CLIMessenger Module Outputs color-coordinated messages to a CLI ====================================================== ;T;[;[;I" ====================================================== CLIMessenger Module Outputs color-coordinated messages to a CLI ======================================================;T; 0;!@;"F;#o;$;%F;&i;'i ;(@;I"CLIUtils::Messenging;F;+To; ;IC;[o; ; F; ;;;;I"'CLIUtils::Configurator#config_path;F;[;[[I"!lib/cliutils/configurator.rb;Ti;T;;,;;;[;{;IC;"{==================================================== Attributes ==================================================== ;T;[;[;I"| ==================================================== Attributes ====================================================;T; 0;!@;"F;#o;$;%F;&i;'i;(@;)I"'def config_path @config_path end;T;*I"def config_path;T;+To; ; F; ;;;;I" CLIUtils::Configurator#data;F;[;[[@i;T;: data;;;[;{;IC;"{==================================================== Attributes ==================================================== ;T;[;[;@$; 0;!@(;"F;#@%;(@;)I"def data @data end;T;*I" def data;T;+To; ; F; ;;;;I"&CLIUtils::Configurator#initialize;F;[[I" path;T0;[[@i;T;;.;;;[;{;IC;"[==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Initializes configuration from a flat file. @param path The filepath to the config YAML @return void ---------------------------------------------------- ;T;[;[o;/ ;0I" return;F;1I"#a new instance of Configurator;T;0;2[I"Configurator;F;!@4;I"\ ==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Initializes configuration from a flat file. @param path The filepath to the config YAML @return void ----------------------------------------------------;T; 0;!@4;"F;#o;$;%F;&i;'i;(@;)I"def initialize(path) _path = File.expand_path(path) @config_path = _path @data = {} if File.exists?(_path) data = YAML::load_file(_path) @data.deep_merge!(data).deep_symbolize_keys! end end;T;*I"def initialize(path);T;+T;3To; ; F; ;;;;I"'CLIUtils::Configurator#add_section;F;[[I"section_name;T0;[[@i2;T;:add_section;;;[;{;IC;"---------------------------------------------------- add_section method Adds a new section to the config file (if it doesn't already exist). @param section_name The section to add @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- add_section method Adds a new section to the config file (if it doesn't already exist). @param section_name The section to add @return Void ----------------------------------------------------;T; 0;!@I;"F;#o;$;%F;&i*;'i1;(@;)I"def add_section(section_name) if !@data.key?(section_name) @data[section_name] = {} else fail "Section already exists: #{ section_name }" end end;T;*I""def add_section(section_name);T;+T;3To; ; F; ;;;;I"*CLIUtils::Configurator#delete_section;F;[[I"section_name;T0;[[@iA;T;:delete_section;;;[;{;IC;"---------------------------------------------------- delete_section method Removes a section to the config file (if it exists). @param section_name The section to remove @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- delete_section method Removes a section to the config file (if it exists). @param section_name The section to remove @return Void ----------------------------------------------------;T; 0;!@Y;"F;#o;$;%F;&i:;'i@;(@;)I"def delete_section(section_name) if @data.key?(section_name) @data.delete(section_name) else fail "Cannot delete nonexistent section: #{ section_name }" end end;T;*I"%def delete_section(section_name);T;+T;3To; ; F; ;;;;I"(CLIUtils::Configurator#ingest_prefs;F;[[I" prefs;T0;[[@iQ;T;:ingest_prefs;;;[;{;IC;"---------------------------------------------------- ingest_prefs method Ingests a Prefs class and adds its answers to the configuration data. @param prefs The Prefs class to examine @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- ingest_prefs method Ingests a Prefs class and adds its answers to the configuration data. @param prefs The Prefs class to examine @return Void ----------------------------------------------------;T; 0;!@i;"F;#o;$;%F;&iI;'iP;(@;)I"def ingest_prefs(prefs) fail 'Invaid Prefs class' if !prefs.kind_of?(Prefs) || prefs.answers.nil? prefs.answers.each do |p| add_section(p[:section]) unless @data.key?(p[:section]) @data[p[:section]].merge!(p[:key] => p[:answer]) end end;T;*I"def ingest_prefs(prefs);T;+T;3To; ; F; ;;;;I"*CLIUtils::Configurator#method_missing;F;[[I" name;T0[I" *args;T0[I" &block;T0;[[@ic;T;:method_missing;;;[;{;IC;" ---------------------------------------------------- method_missing method Allows this module to return data from the config Hash when given a method name that matches a key. @param name @param *args @param &block @return Hash ---------------------------------------------------- ;T;[;[;I"! ---------------------------------------------------- method_missing method Allows this module to return data from the config Hash when given a method name that matches a key. @param name @param *args @param &block @return Hash ----------------------------------------------------;T; 0;!@y;"F;#o;$;%F;&iY;'ib;(@;)I"hdef method_missing(name, *args, &block) @data[name.to_sym] || @data.merge!(name.to_sym => {}) end;T;*I",def method_missing(name, *args, &block);T;+T;3To; ; F; ;;;;I"!CLIUtils::Configurator#reset;F;[;[[@im;T;: reset;;;[;{;IC;"---------------------------------------------------- reset method Clears the configuration data. @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- reset method Clears the configuration data. @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&ig;'il;(@;)I"def reset @data = {} end;T;*I"def reset;T;+T;3To; ; F; ;;;;I" CLIUtils::Configurator#save;F;[;[[@ix;T;: save;;;[;{;IC;"---------------------------------------------------- save method Saves the configuration data to the previously stored flat file. @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- save method Saves the configuration data to the previously stored flat file. @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iq;'iw;(@;)I"cdef save File.open(@config_path, 'w') { |f| f.write(@data.deep_stringify_keys.to_yaml) } end;T;*I" def save;T;+T;3T;8@;9IC;[;8@;:IC;[;8@;WIC;X{;FIC;X{;YT;IC;X{;,IC;X{;^@;_0;YT;hIC;X{;^@(;_0;YT;YT;YT;Z{;[[;[[@i;T;:Configurator;;;;;[;{;IC;"====================================================== Configuration Class Manages any configuration values and the flat YAML file into which they get stored. ====================================================== ;T;[;[;I" ====================================================== Configuration Class Manages any configuration values and the flat YAML file into which they get stored. ======================================================;T; 0;!@;"F;#o;$;%F;&i ;'i;(@;I"CLIUtils::Configurator;F;ao;; ;<0;=0;>0;;b;(@;@0;\;F;+To; ;IC;[o; ; F; ;F;;;I"%CLIUtils::Configuration.included;F;[[I"k;T0;[[I""lib/cliutils/configuration.rb;Ti;T;;G;;;[;{;IC;"x==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ---------------------------------------------------- ;T;[;[;I"y ==================================================== Methods ==================================================== ---------------------------------------------------- included method Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i;(@;)I".def self.included(k) k.extend(self) end;T;*I"def self.included(k);T;+T;3To; ; F; ;;;;I"*CLIUtils::Configuration#configuration;F;[;[[@i&;T;:configuration;;;[;{;IC;"---------------------------------------------------- configuration method Singleton method to return (or initialize, if needed) a Configurator. @return Configurator ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- configuration method Singleton method to return (or initialize, if needed) a Configurator. @return Configurator ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i%;(@;)I"Wdef configuration @configuration ||= Configurator.new('~/.default-cliutils') end;T;*I"def configuration;T;+T;3To; ; F; ;;;;I"/CLIUtils::Configuration#load_configuration;F;[[I" path;T0;[[@i1;T;:load_configuration;;;[;{;IC;"---------------------------------------------------- load_configuration method Initializes a Configurator with the passed filepath. @param path The path to the config file @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- load_configuration method Initializes a Configurator with the passed filepath. @param path The path to the config file @return Void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i*;'i0;(@;)I"Odef load_configuration(path) @configuration = Configurator.new(path) end;T;*I"!def load_configuration(path);T;+T;3T;8@;9IC;[;8@;:IC;[;8@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i;T;:Configuration;;;;;[;{;IC;"====================================================== Configuration Class Manages any configuration values and the flat YAML file into which they get stored. ====================================================== ;T;[;[;I" ====================================================== Configuration Class Manages any configuration values and the flat YAML file into which they get stored. ======================================================;T; 0;!@;"F;#o;$;%F;&i ;'i;(@;I"CLIUtils::Configuration;F;+To; ;IC;[ o; ; F; ;;;;I"&CLIUtils::LoggerDelegator#devices;F;[;[[I"%lib/cliutils/logger-delegator.rb;Ti;T;: devices;;;[;{;IC;"{==================================================== Attributes ==================================================== ;T;[;[;I"~ ==================================================== Attributes ==================================================== ;T; 0;!@;"F;#o;$;%F;&i;'i;(@;)I"def devices @devices end;T;*I"def devices;T;+To; ; F; ;;;;I")CLIUtils::LoggerDelegator#initialize;F;[[I" *targets;T0;[[@i;T;;.;;;[;{;IC;"<==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Initializer @param *targets The endpoints to delegate to @return void ---------------------------------------------------- ;T;[;[o;/ ;0I" return;F;1I"&a new instance of LoggerDelegator;T;0;2[I"LoggerDelegator;F;!@;I"= ==================================================== Methods ==================================================== ---------------------------------------------------- initialize method Initializer @param *targets The endpoints to delegate to @return void ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i;(@;)I"Qdef initialize(*targets) @targets = targets LoggerDelegator.delegate end;T;*I"def initialize(*targets);T;+T;3To; ; F; ;;;;I"%CLIUtils::LoggerDelegator#attach;F;[[I" target;T0;[[@i(;T;: attach;;;[;{;IC;"---------------------------------------------------- attach method Attaches a new target to delegate to. @return void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- attach method Attaches a new target to delegate to. @return void ---------------------------------------------------- ;T; 0;!@%;"F;#o;$;%F;&i";'i';(@;)I"Kdef attach(target) @targets << target LoggerDelegator.delegate end;T;*I"def attach(target);T;+T;3To; ; F; ;F;;;I"'CLIUtils::LoggerDelegator.delegate;F;[;[[@i4;T;: delegate;;;[;{;IC;"---------------------------------------------------- delegate_all method Creates delegator methods for all of the methods on IO. @return void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- delegate_all method Creates delegator methods for all of the methods on IO. @return void ----------------------------------------------------;T; 0;!@5;"F;#o;$;%F;&i-;'i3;(@;)I"def self.delegate %w(log debug info warn error section success).each do |m| define_method(m) do |*args| @targets.map { |t| t.send(m, *args) } end end end;T;*I"def self.delegate;T;+T;3To; ; F; ;;;;I"%CLIUtils::LoggerDelegator#detach;F;[[I" target;T0;[[@iB;T;: detach;;;[;{;IC;"---------------------------------------------------- detach method Detaches a delegation target. @return void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- detach method Detaches a delegation target. @return void ---------------------------------------------------- ;T; 0;!@C;"F;#o;$;%F;&i<;'iA;(@;)I"Pdef detach(target) @targets.delete(target) LoggerDelegator.delegate end;T;*I"def detach(target);T;+T;3T;8@;9IC;[;8@;:IC;[;8@;WIC;X{;FIC;X{;YT;IC;X{;sIC;X{;^@;_0;YT;YT;YT;Z{;[[;[[@i ;T;:LoggerDelegator;;;;;[;{;IC;"====================================================== LoggerDelegator Class Manages any configuration values and the flat YAML file into which they get stored. ====================================================== ;T;[;[;I" ====================================================== LoggerDelegator Class Manages any configuration values and the flat YAML file into which they get stored. ======================================================;T; 0;!@;"F;#o;$;%F;&i;'i ;(@;I"CLIUtils::LoggerDelegator;F;ao;; ;<0;=0;>0;;b;(@;@0;\;F;+T;8@;9IC;[;8@;:IC;[;8@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[ [I"lib/cliutils.rb;Ti[@i[@i[@~i[@i[@i[@i[@i;F;: CLIUtils;;;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@;I" CLIUtils;Fo; ;IC;[o; ; F; ;;;;I"Hash#deep_merge!;F;[[I"other_hash;T0[I" &block;T0;[[I"(lib/cliutils/ext/Hash+Extensions.rb;Ti;T;:deep_merge!;;;[;{;IC;"c==================================================== Methods ==================================================== ---------------------------------------------------- deep_merge! method Deep merges a hash into the current one. @param other_hash The hash to merge in @param &block @return Hash ---------------------------------------------------- ;T;[;[;I"d ==================================================== Methods ==================================================== ---------------------------------------------------- deep_merge! method Deep merges a hash into the current one. @param other_hash The hash to merge in @param &block @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i ;'i;(@~;)I"def deep_merge!(other_hash, &block) other_hash.each_pair do |k,v| tv = self[k] if tv.is_a?(Hash) && v.is_a?(Hash) self[k] = tv.deep_merge(v, &block) else self[k] = block && tv ? block.call(k, tv, v) : v end end self end;T;*I"(def deep_merge!(other_hash, &block);T;+T;3To; ; F; ;;;;I"Hash#deep_stringify_keys;F;[;[[@i+;T;:deep_stringify_keys;;;[;{;IC;"---------------------------------------------------- deep_stringify_keys method Recursively turns all Hash keys into strings and returns the new Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_stringify_keys method Recursively turns all Hash keys into strings and returns the new Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i$;'i*;(@~;)I"Hdef deep_stringify_keys deep_transform_keys{ |key| key.to_s } end;T;*I"def deep_stringify_keys;T;+T;3To; ; F; ;;;;I"Hash#deep_stringify_keys!;F;[;[[@i6;T;:deep_stringify_keys!;;;[;{;IC;"---------------------------------------------------- deep_symbolize_keys! method Same as deep_stringify_keys, but destructively alters the original Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_symbolize_keys! method Same as deep_stringify_keys, but destructively alters the original Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i/;'i5;(@~;)I"Jdef deep_stringify_keys! deep_transform_keys!{ |key| key.to_s } end;T;*I"def deep_stringify_keys!;T;+T;3To; ; F; ;;;;I"Hash#deep_symbolize_keys;F;[;[[@iA;T;:deep_symbolize_keys;;;[;{;IC;"---------------------------------------------------- deep_symbolize_keys method Recursively turns all Hash keys into symbols and returns the new Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_symbolize_keys method Recursively turns all Hash keys into symbols and returns the new Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i:;'i@;(@~;)I"Udef deep_symbolize_keys deep_transform_keys{ |key| key.to_sym rescue key } end;T;*I"def deep_symbolize_keys;T;+T;3To; ; F; ;;;;I"Hash#deep_symbolize_keys!;F;[;[[@iL;T;:deep_symbolize_keys!;;;[;{;IC;"---------------------------------------------------- deep_symbolize_keys! method Same as deep_symbolize_keys, but destructively alters the original Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_symbolize_keys! method Same as deep_symbolize_keys, but destructively alters the original Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iE;'iK;(@~;)I"Wdef deep_symbolize_keys! deep_transform_keys!{ |key| key.to_sym rescue key } end;T;*I"def deep_symbolize_keys!;T;+T;3To; ; F; ;;;;I"Hash#deep_transform_keys;F;[[I" &block;T0;[[@iW;T;:deep_transform_keys;;;[;{;IC;"---------------------------------------------------- deep_transform_keys method Generic method to perform recursive operations on a Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_transform_keys method Generic method to perform recursive operations on a Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&iP;'iV;(@~;)I"Wdef deep_transform_keys(&block) _deep_transform_keys_in_object(self, &block) end;T;*I"$def deep_transform_keys(&block);T;+T;3To; ; F; ;;;;I"Hash#deep_transform_keys!;F;[[I" &block;T0;[[@ib;T;:deep_transform_keys!;;;[;{;IC;"---------------------------------------------------- deep_transform_keys! method Same as deep_transform_keys, but destructively alters the original Hash. @return Hash ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- deep_transform_keys! method Same as deep_transform_keys, but destructively alters the original Hash. @return Hash ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i[;'ia;(@~;)I"Ydef deep_transform_keys!(&block) _deep_transform_keys_in_object!(self, &block) end;T;*I"%def deep_transform_keys!(&block);T;+T;3To; ; F; ;;;5;I"(Hash#_deep_transform_keys_in_object;F;[[I" object;T0[I" &block;T0;[[@ir;T;:#_deep_transform_keys_in_object;;;[;{;IC;"---------------------------------------------------- _deep_transform_keys_in_object method Modification to deep_transform_keys that allows for the existence of arrays. https://github.com/rails/rails/pull/9720/files?short_path=4be3c90 @param object The object to examine @param &block A block to execute on the opject @return Object ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- _deep_transform_keys_in_object method Modification to deep_transform_keys that allows for the existence of arrays. https://github.com/rails/rails/pull/9720/files?short_path=4be3c90 @param object The object to examine @param &block A block to execute on the opject @return Object ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&ih;'iq;(@~;)I"@def _deep_transform_keys_in_object(object, &block) case object when Hash object.each_with_object({}) do |(key, value), result| result[yield(key)] = _deep_transform_keys_in_object(value, &block) end when Array object.map {|e| _deep_transform_keys_in_object(e, &block) } else object end end;T;*I"7def _deep_transform_keys_in_object(object, &block);T;+T;3To; ; F; ;;;5;I")Hash#_deep_transform_keys_in_object!;F;[[I" object;T0[I" &block;T0;[[@i;T;:$_deep_transform_keys_in_object!;;;[;{;IC;"P---------------------------------------------------- _deep_transform_keys_in_object! method Same as _deep_transform_keys_in_object, but destructively alters the original Object. @param object The object to examine @param &block A block to execute on the opject @return Object ---------------------------------------------------- ;T;[;[;I"Q ---------------------------------------------------- _deep_transform_keys_in_object! method Same as _deep_transform_keys_in_object, but destructively alters the original Object. @param object The object to examine @param &block A block to execute on the opject @return Object ----------------------------------------------------;T; 0;!@;"F;#o;$;%F;&i;'i;(@~;)I"Sdef _deep_transform_keys_in_object!(object, &block) case object when Hash object.keys.each do |key| value = object.delete(key) object[yield(key)] = _deep_transform_keys_in_object!(value, &block) end object when Array object.map! {|e| _deep_transform_keys_in_object!(e, &block)} else object end end;T;*I"8def _deep_transform_keys_in_object!(object, &block);T;+T;3T;8@~;9IC;[;8@~;:IC;[;8@~;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;: Hash;;;;;[;{;IC;"====================================================== Hash Class Contains many convenient methods borrowed from Rails http://api.rubyonrails.org/classes/Hash.html ====================================================== ;T;[;[;I" ====================================================== Hash Class Contains many convenient methods borrowed from Rails http://api.rubyonrails.org/classes/Hash.html ======================================================;T; 0;!@~;"F;#o;$;%F;&i;'i ;(@;I" Hash;F;ao;; ;<0;=0;>0;;b;(@;@0;\;Fo; ;IC;[o; ; F; ;F;;;I"Logger.custom_level;F;[[I"tag;T0;[[I"*lib/cliutils/ext/Logger+Extensions.rb;Ti;T;:custom_level;;;[;{;IC;"---------------------------------------------------- custom_level method Creates a custom Logger level based on the passed tag. @param tag The Logger level to create @return Void ---------------------------------------------------- ;T;[;[;I" ---------------------------------------------------- custom_level method Creates a custom Logger level based on the passed tag. @param tag The Logger level to create @return Void ----------------------------------------------------;T; 0;!@#;"F;#o;$;%F;&i ;'i;(@!;)I"def self.custom_level(tag) SEV_LABEL << tag idx = SEV_LABEL.size - 1 define_method(tag.downcase.gsub(/\W+/, '_').to_sym) do |progname, &block| add(idx, nil, progname, &block) end end;T;*I"def self.custom_level(tag);T;+T;3T;8@!;9IC;[;8@!;:IC;[;8@!;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@*i ;T;: Logger;;;;;[;{;IC;"|====================================================== Logger Class ====================================================== ;T;[;[;I"} ====================================================== Logger Class ======================================================;T; 0;!@!;"F;#o;$;%F;&i;'i ;(@;I" Logger;F;ao;; ;<0;=0;>0;;b;(@;@0;\;Fo; ;IC;[ o; ; F; ;;;;I"String#colorize;F;[[I"color_code;T0;[[I"*lib/cliutils/ext/String+Extensions.rb;Ti;T;: colorize;;;[;{;IC;"W==================================================== Color String Methods ==================================================== ---------------------------------------------------- colorize method Outputs a string in a formatted color. @param color_code The code to use @return Void ---------------------------------------------------- ;T;[;[;I"X ==================================================== Color String Methods ==================================================== ---------------------------------------------------- colorize method Outputs a string in a formatted color. @param color_code The code to use @return Void ----------------------------------------------------;T; 0;!@H;"F;#o;$;%F;&i ;'i;(@F;)I"Kdef colorize(color_code) "\033[#{ color_code }m#{ self }\033[0m" end;T;*I"def colorize(color_code);T;+T;3To; ; F; ;;;;I"String#blue;F;[;[[@Oi;F;: blue;;;[;{;IC;" ;T;!@Y;C0;"F;[;[;I";T; 0;(@F;)I"def blue; colorize(34) end;T;*I"def blue; colorize(34) end;T;+T;3To; ; F; ;;;;I"String#cyan;F;[;[[@Oi;F;: cyan;;;[;{;IC;" ;T;!@f;C0;"F;[;[;I";T; 0;(@F;)I"def cyan; colorize(36) end;T;*I"def cyan; colorize(36) end;T;+T;3To; ; F; ;;;;I"String#green;F;[;[[@Oi;F;: green;;;[;{;IC;" ;T;!@s;C0;"F;[;[;I";T; 0;(@F;)I" def green; colorize(32) end;T;*I" def green; colorize(32) end;T;+T;3To; ; F; ;;;;I"String#purple;F;[;[[@Oi;F;: purple;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@F;)I"!def purple; colorize(35) end;T;*I"!def purple; colorize(35) end;T;+T;3To; ; F; ;;;;I"String#red;F;[;[[@Oi;F;:red;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@F;)I"def red; colorize(31) end;T;*I"def red; colorize(31) end;T;+T;3To; ; F; ;;;;I"String#white;F;[;[[@Oi;F;: white;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@F;)I" def white; colorize(37) end;T;*I" def white; colorize(37) end;T;+T;3To; ; F; ;;;;I"String#yellow;F;[;[[@Oi;F;: yellow;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(@F;)I"!def yellow; colorize(33) end;T;*I"!def yellow; colorize(33) end;T;+T;3T;8@F;9IC;[;8@F;:IC;[;8@F;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@Oi ;T;: String;;;;;[;{;IC;"|====================================================== String Class ====================================================== ;T;[;[;I"} ====================================================== String Class ======================================================;T; 0;!@F;"F;#o;$;%F;&i;'i;(@;I" String;F;ao;; ;<0;=0;>0;;b;(@;@0;\;F;8@;9IC;[;8@;:IC;[;8@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[;F;;;;;;;[;{;IC;" ;T;!@;C0;"F;[;[;I";T; 0;(0;I";T;x@:CLIUtils::Prefs@ :CLIUtils::Prefs#answers@ : CLIUtils::Prefs#config_path@:CLIUtils::Prefs#prompts@':CLIUtils::Prefs#initialize@3:CLIUtils::Prefs#ask@H:$CLIUtils::Prefs#_deliver_prompt@V:-CLIUtils::Prefs#_requirements_fulfilled?@f:CLIUtils::VERSION@:CLIUtils::PrettyIO@~:CLIUtils::PrettyIO::@@wrap@{:*CLIUtils::PrettyIO::@@wrap_char_limit@: CLIUtils::PrettyIO.included@:#CLIUtils::PrettyIO#color_chart@:CLIUtils::PrettyIO#debug@:CLIUtils::PrettyIO#error@:CLIUtils::PrettyIO#info@:"CLIUtils::PrettyIO#info_block@:CLIUtils::PrettyIO#log@:CLIUtils::PrettyIO#prompt@ :CLIUtils::PrettyIO#section@ :%CLIUtils::PrettyIO#section_block@0:CLIUtils::PrettyIO#success@C:CLIUtils::PrettyIO#warn@S:CLIUtils::PrettyIO.wrap@c:"CLIUtils::PrettyIO.wrap_limit@s:CLIUtils::PrettyIO.wrap_at@:"CLIUtils::PrettyIO#_word_wrap@:CLIUtils::Messenging@:"CLIUtils::Messenging.included@:*CLIUtils::Messenging#default_instance@:#CLIUtils::Messenging#messenger@:CLIUtils::Configurator@:'CLIUtils::Configurator#config_path@: CLIUtils::Configurator#data@(:&CLIUtils::Configurator#initialize@4:'CLIUtils::Configurator#add_section@I:*CLIUtils::Configurator#delete_section@Y:(CLIUtils::Configurator#ingest_prefs@i:*CLIUtils::Configurator#method_missing@y:!CLIUtils::Configurator#reset@: CLIUtils::Configurator#save@:CLIUtils::Configuration@:%CLIUtils::Configuration.included@:*CLIUtils::Configuration#configuration@:/CLIUtils::Configuration#load_configuration@:CLIUtils::LoggerDelegator@:&CLIUtils::LoggerDelegator#devices@:)CLIUtils::LoggerDelegator#initialize@:%CLIUtils::LoggerDelegator#attach@%:'CLIUtils::LoggerDelegator.delegate@5:%CLIUtils::LoggerDelegator#detach@C;}@~:Hash#deep_merge!@:Hash#deep_stringify_keys@:Hash#deep_stringify_keys!@:Hash#deep_symbolize_keys@:Hash#deep_symbolize_keys!@:Hash#deep_transform_keys@:Hash#deep_transform_keys!@:(Hash#_deep_transform_keys_in_object@:)Hash#_deep_transform_keys_in_object!@;@!:Logger.custom_level@#;@F:String#colorize@H:String#blue@Y:String#cyan@f:String#green@s:String#purple@:String#red@:String#white@:String#yellow@