Method: YARD::Parser::Ruby::Legacy::TokenList#to_s

Defined in:
lib/yard/parser/ruby/legacy/token_list.rb

#to_s(full_statement = false, show_block = true) ⇒ Object



11
12
13
14
15
16
# File 'lib/yard/parser/ruby/legacy/token_list.rb', line 11

def to_s(full_statement = false, show_block = true)
  inject([]) do |acc, token|
    break acc if !full_statement && TkStatementEnd === token
    acc << (!show_block && TkBlockContents === token ? "" : token.text)
  end.join
end