Method: RBS::Annotate::Formatter#<<
- Defined in:
- lib/rbs/annotate/formatter.rb
#<<(s) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rbs/annotate/formatter.rb', line 13 def <<(s) if s if s.is_a?(RDoc::Markup::Document) s = self.class.translate(s) or raise end s = s.rstrip unless s.empty? if ss = @pending_separator buffer << ss buffer << "\n" @pending_separator = nil end buffer << s buffer << "\n" end end self end |