Class: YARD::Parser::Ruby::Legacy::StatementList
- Inherits:
-
Array
- Object
- Array
- YARD::Parser::Ruby::Legacy::StatementList
- Includes:
- RubyToken
- Defined in:
- lib/yard/parser/ruby/legacy/statement_list.rb
Constant Summary
Instance Method Summary (collapse)
-
- (StatementList) initialize(content)
constructor
Creates a new statement list.
Methods inherited from Array
Constructor Details
- (StatementList) initialize(content)
Creates a new statement list
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yard/parser/ruby/legacy/statement_list.rb', line 14 def initialize(content) @group = 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 |