Class: Coverband::Utils::MethodDefinitionScanner
- Inherits:
-
Object
- Object
- Coverband::Utils::MethodDefinitionScanner
- Defined in:
- lib/coverband/utils/method_definition_scanner.rb
Defined Under Namespace
Classes: MethodBody, MethodDefinition
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ MethodDefinitionScanner
constructor
A new instance of MethodDefinitionScanner.
- #scan ⇒ Object
Constructor Details
#initialize(path) ⇒ MethodDefinitionScanner
Returns a new instance of MethodDefinitionScanner.
9 10 11 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 9 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 7 def path @path end |
Class Method Details
.scan(path) ⇒ Object
17 18 19 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 17 def self.scan(path) new(path).scan end |
Instance Method Details
#scan ⇒ Object
13 14 15 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 13 def scan scan_node(RubyVM::AbstractSyntaxTree.parse_file(path), nil) end |