Class: RbTags::Formats::Extended
- Defined in:
- lib/rbtags/formats/extended.rb
Defined Under Namespace
Modules: Instance Classes: Class, Method
Instance Method Summary collapse
- #class(klass, trace) ⇒ Object
- #finish ⇒ Object
-
#initialize(io = $stdout) ⇒ Extended
constructor
A new instance of Extended.
- #method(klass, object, method, singleton, trace) ⇒ Object
Constructor Details
#initialize(io = $stdout) ⇒ Extended
Returns a new instance of Extended.
8 9 10 11 |
# File 'lib/rbtags/formats/extended.rb', line 8 def initialize(io = $stdout) @io = io @lines = [] end |
Instance Method Details
#class(klass, trace) ⇒ Object
13 14 15 |
# File 'lib/rbtags/formats/extended.rb', line 13 def class(klass, trace) @lines << Class.new(klass, trace) end |
#finish ⇒ Object
21 22 23 24 25 |
# File 'lib/rbtags/formats/extended.rb', line 21 def finish @lines.reject{ |line| line.reject? }.map{ |line| line.to_s }.sort.each do |line| @io.puts line end end |