Class: Parser::Source::Buffer
- Inherits:
-
Object
- Object
- Parser::Source::Buffer
- Defined in:
- opal/lib/opal/parser/patch.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#source_lines ⇒ Object
33 34 35 36 37 38 39 |
# File 'opal/lib/opal/parser/patch.rb', line 33 def source_lines @lines ||= begin lines = @source.lines.to_a lines << '' if @source.end_with?("\n") lines.map { |line| line.chomp("\n") } end end |