Parent

Methods

Class/Module Index [+]

Quicksearch

YARD::Parser::Ruby::Legacy::StatementList

Constants

OPEN_BLOCK_TOKENS

The following list of tokens will require a block to be opened if used at the beginning of a statement.

Attributes

encoding_line[RW]
shebang_line[RW]

Public Class Methods

new(content) click to toggle source

Creates a new statement list

@param [TokenList, String] content the tokens to create the list from

# File lib/yard/parser/ruby/legacy/statement_list.rb, line 16
def initialize(content)
  @shebang_line = nil
  @encoding_line = nil
  if content.is_a? TokenList
    @tokens = content.dup
  elsif content.is_a? String
    @tokens = TokenList.new(content.gsub("\r", ""))
  else
    raise ArgumentError, "Invalid content for StatementList: #{content.inspect}:#{content.class}"
  end

  parse_statements
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.