Class: Idcf::Cli::Command::Morio
- Inherits:
-
Object
- Object
- Idcf::Cli::Command::Morio
- Defined in:
- lib/idcf/cli/command/morio.rb
Overview
morio command
Constant Summary collapse
- MORIO_TXT =
<<-TEXT.freeze -+sso+- .... -ssssssso` `-/ossssss+/. `ssssssso` `/ssssssssssssso- /sssss+ .-:ossssssssssssssss` sssssss` `/sssssssssssssssssssss.+sssssss. `ossssssssssssssssssssss`osssssss` /sssssssssssssssssssssss-ossssss+ :sssssssssssssssssssssssssssssso` /ssssssssssssssssssssssssssss+` ./osssssssssssssssssssssss+. `-:+oosssssssssssso+:. `````````` TEXT
- ATTRIBUTES_OFF =
"\e[0m".freeze
- MORIO_COLOR =
"\e[38;5;45m".freeze
- TITLE_COLOR =
"\e[38;5;45m".freeze
- TEXT_COLOR =
"\e[37m".freeze
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
34 35 36 |
# File 'lib/idcf/cli/command/morio.rb', line 34 def client @client end |
Instance Method Details
#exec ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/idcf/cli/command/morio.rb', line 36 def exec morio_list = MORIO_TXT.split("\n") max = max_length(morio_list) contents = make_contents morio_list.each_with_index do |line, idx| fill_cnt = max - line.bytesize fill = fill_cnt > 0 ? ''.ljust(fill_cnt, ' ') : '' base_str = "#{MORIO_COLOR}#{line} #{fill}" puts make_out_str(base_str, contents, idx) end puts ATTRIBUTES_OFF end |