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) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(file) ⇒ Parser
Returns a new instance of Parser.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/flutter/parser.rb', line 16 def initialize(file) @signatures = {} @targets = Set.new 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.
13 14 15 |
# File 'lib/flutter/parser.rb', line 13 def method_cache @method_cache end |
Instance Attribute Details
#signatures ⇒ Object (readonly)
Returns the value of attribute signatures.
9 10 11 |
# File 'lib/flutter/parser.rb', line 9 def signatures @signatures end |