Permalink
Browse files

Better choice for flat output

  • Loading branch information...
1 parent 05573af commit b44c10398833cb027259988707cd8721cdd527c8 @jimweirich committed Sep 20, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lustro.rb
View
@@ -145,13 +145,15 @@ class Formatter
attr_reader :options
def emit(string)
+ puts string
end
def display(methods, opts)
@options = opts
if options[:flat]
list = methods.map { |rc, ms| ms }.flatten.sort
- display_scope(["#{methods.first.first} (flat)", list])
+ the_class = methods.map { |m| m.first }.detect { |m| ! m.is_a?(Symbol) }
+ display_scope(["#{the_class} (flat)", list])
else
methods.each do |scope|
break if scope.first == options[:omit]

0 comments on commit b44c103

Please sign in to comment.