Class: Flutter::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/flutter/parser.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, hints = []) ⇒ Parser

Returns a new instance of Parser.



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/flutter/parser.rb', line 17

def initialize(file, hints = [])
  @signatures = {}
  @targets = Set.new(hints)
  if File.exist?(file)
    code = File.open(file, "r").read
    @file = File.absolute_path(file)
    @ast = ::Parser::CurrentRuby.parse(code)
    collect_targets(nil, nil, false)
    build_signatures
  end
end

Class Attribute Details

.method_cacheObject (readonly)

Returns the value of attribute method_cache.



14
15
16
# File 'lib/flutter/parser.rb', line 14

def method_cache
  @method_cache
end

Instance Attribute Details

#signaturesObject (readonly)

Returns the value of attribute signatures.



10
11
12
# File 'lib/flutter/parser.rb', line 10

def signatures
  @signatures
end