Flowdock
method

parse_require

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: Ruby
parse_require(context, comment) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/parser/ruby.rb, line 2298
  def parse_require(context, comment)
    skip_tkspace_comment
    tk = get_tk
    if TkLPAREN === tk then
      skip_tkspace_comment
      tk = get_tk
    end

    name = nil
    case tk
    when TkSTRING
      name = tk.text
      #    when TkCONSTANT, TkIDENTIFIER, TkIVAR, TkGVAR
      #      name = tk.name
    when TkDSTRING
      warn "Skipping require of dynamic string: #{tk.text}"
      #   else
      #     warn "'require' used as variable"
    end
    if name
      context.add_require RDoc::Require.new(name, comment)
    else
      unget_tk(tk)
    end
  end
Register or log in to add new notes.