module Tux::CommandsFormatted
Public Class Methods
format(arr)
click to toggle source
# File lib/tux/commands.rb, line 32 def self.format(arr) arr = arr.map {|e| [e[0], e[1].inspect] } max1 = arr.map {|e| e[0].length }.max max2 = arr.map {|e| e[1].length }.max arr.map {|k,v| "%-*s %-*s" % [max1, k, max2, v] } end
Public Instance Methods
routes()
click to toggle source
Calls superclass method
# File lib/tux/commands.rb, line 39 def routes puts CommandsFormatted.format(super) end
settings()
click to toggle source
Calls superclass method
# File lib/tux/commands.rb, line 43 def settings puts CommandsFormatted.format(super) end