module ToAscii::ColumnDefiner
Public Instance Methods
column(name, width)
click to toggle source
# File lib/to_ascii/visitor.rb, line 3 def column(name, width) columns << create_column(name, width) end
id(width = 6)
click to toggle source
# File lib/to_ascii/visitor.rb, line 7 def id(width = 6) create_column :id, width end
method_missing(method, *args, &block)
click to toggle source
# File lib/to_ascii/visitor.rb, line 19 def method_missing(method, *args, &block) raise ArgumentError, "wrong number of arguments (#{args.length} for 0..1)" if args.length > 1 width = args.length == 1 ? args[0] : method.to_s.length + 2 create_column method, width end
respond_to?(method, include_private = false)
click to toggle source
# File lib/to_ascii/visitor.rb, line 15 def respond_to?(method, include_private = false) true end
respond_to_missing?(method, include_private = false)
click to toggle source
# File lib/to_ascii/visitor.rb, line 11 def respond_to_missing?(method, include_private = false) # ruby 1.9+ only, but 1.8 won't care because it just looks like a method #honeybadger true end
Private Instance Methods
create_column(name, width)
click to toggle source
# File lib/to_ascii/visitor.rb, line 27 def create_column(name, width) [name, width] end