Class: Flutter::Parser
- Inherits:
-
Object
- Object
- Flutter::Parser
- Defined in:
- lib/flutter/parser.rb
Class Attribute Summary collapse
-
.method_cache ⇒ Object
readonly
Returns the value of attribute method_cache.
Instance Attribute Summary collapse
-
#signatures ⇒ Object
readonly
Returns the value of attribute signatures.
Instance Method Summary collapse
-
#initialize(file, hints = []) ⇒ Parser
constructor
A new instance of Parser.
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_cache ⇒ Object (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
#signatures ⇒ Object (readonly)
Returns the value of attribute signatures.
10 11 12 |
# File 'lib/flutter/parser.rb', line 10 def signatures @signatures end |