Method: Cog::Language#to_s

Defined in:
lib/cog/language.rb

#to_s(w = nil) ⇒ String

Returns one line summary in two columns.

Parameters:

  • w (FixNum) (defaults to: nil)

    width of the first column

Returns:

  • (String)

    one line summary in two columns



106
107
108
109
# File 'lib/cog/language.rb', line 106

def to_s(w=nil)
  w ||= @name.length
  "#{@name.ljust w} -> #{@extensions.collect {|x| x.to_s}.sort.join ', '}"
end