Class: Coverband::Utils::MethodDefinitionScanner::MethodDefinition
- Inherits:
-
Object
- Object
- Coverband::Utils::MethodDefinitionScanner::MethodDefinition
- Defined in:
- lib/coverband/utils/method_definition_scanner.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#first_line_number ⇒ Object
readonly
Returns the value of attribute first_line_number.
-
#last_line_number ⇒ Object
readonly
Returns the value of attribute last_line_number.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(first_line_number:, last_line_number:, name:, class_name:, file_path:) ⇒ MethodDefinition
constructor
A new instance of MethodDefinition.
Constructor Details
#initialize(first_line_number:, last_line_number:, name:, class_name:, file_path:) ⇒ MethodDefinition
Returns a new instance of MethodDefinition.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 50 def initialize( first_line_number:, last_line_number:, name:, class_name:, file_path: ) @first_line_number = first_line_number @last_line_number = last_line_number @name = name @class_name = class_name @file_path = file_path end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
44 45 46 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 44 def class_name @class_name end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
44 45 46 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 44 def file_path @file_path end |
#first_line_number ⇒ Object (readonly)
Returns the value of attribute first_line_number.
44 45 46 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 44 def first_line_number @first_line_number end |
#last_line_number ⇒ Object (readonly)
Returns the value of attribute last_line_number.
44 45 46 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 44 def last_line_number @last_line_number end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
44 45 46 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 44 def name @name end |
Instance Method Details
#body ⇒ Object
64 65 66 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 64 def body MethodBody.new(self) end |