Sha256: 783ec82882e28536757a762e21d77c88b6a648b636ed0b91543156f51bb1b64a
Contents?: true
Size: 1.67 KB
Versions: 18
Compression:
Stored size: 1.67 KB
Contents
module Aio::Ui class ReadableText DefaultIndent = 2 class << self def dump_module_cmds(mods, h=nil, indent=DefaultIndent) col = ["cmd name", "ranking", "device", "description"] table = Aio::Base::Toolkit::Table.new( 'Header' => h ||= 'Aio CMD Modules', 'Indent' => indent, 'Columns' => col, 'CellPad' => 2, 'SortIndex' => 2) # info => { :module_type, # :module_layer_2 # :full_path # :klass mods.each_pair do |mod_name, info| row = [] row << info[:klass].cmd_full row << info[:klass].ranking.to_s row << info[:module_layer_2] row << info[:klass].description table << row end table.to_s + "\n" end def dump_module_inputs(mods, h=nil, indent=DefaultIndent) col = ["input style", "platform", "description"] table = Aio::Base::Toolkit::Table.new( 'Header' => h || "Aio Input Modules", 'Indent' => indent, 'Columns' => col, 'CellPad' => 2) mods.each_pair do |mod_name, info| row = [] row << mod_name row << info[:klass].platform row << info[:klass].description table << row end table.to_s + "\n" end def dump_module_outputs(mods, h=nil, indent=DefaultIndent) col = ["output style", "suffix", "description"] table = Aio::Base::Toolkit::Table.new( 'Header' => h || "Aio Output Modules", 'Indent' => indent, 'Columns' => col, 'CellPad' => 2) mods.each_pair do |mod_name, info| row = [] row << mod_name row << info[:klass].file_suffix row << info[:klass].description table << row end table.to_s + "\n" end end # self end end
Version data entries
18 entries across 18 versions & 1 rubygems