Class: AdLint::SourceContent

Inherits:
StringContent show all
Defined in:
lib/adlint/lexer.rb

Overview

DESCRIPTION

Object represents the whole content of the source file.

Instance Method Summary collapse

Methods inherited from StringContent

#_debug_inspect, #check, #eat!, #empty?, #location, #scan

Methods inherited from Content

#empty?, #location

Constructor Details

#initialize(src, tab_width) ⇒ SourceContent

DESCRIPTION

Constructs the content object of the source file.

PARAMETER

src

Source – Target source object.



166
167
168
# File 'lib/adlint/lexer.rb', line 166

def initialize(src, tab_width)
  super(src.open { |io| io.read }, tab_width, src.fpath)
end