Method: HDLRuby::Checker#initialize

Defined in:
lib/HDLRuby/hruby_check.rb

#initialize(code, filename = nil) ⇒ Checker

Create a new checker on +code+ string, from +filename+ file. Returns a list of error and the related object and method.



19
20
21
22
23
24
# File 'lib/HDLRuby/hruby_check.rb', line 19

def initialize(code,filename = nil)
    @code = Ripper.sexp(code.to_s,filename ? filename : "-", 1)
    @code ||= [] # In case the parse failed
    @filename = filename
    # puts "@code=#{@code}"
end