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.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 62 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.
56 57 58 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 56 def class_name @class_name end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
56 57 58 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 56 def file_path @file_path end |
#first_line_number ⇒ Object (readonly)
Returns the value of attribute first_line_number.
56 57 58 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 56 def first_line_number @first_line_number end |
#last_line_number ⇒ Object (readonly)
Returns the value of attribute last_line_number.
56 57 58 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 56 def last_line_number @last_line_number end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
56 57 58 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 56 def name @name end |
Instance Method Details
#body ⇒ Object
76 77 78 |
# File 'lib/coverband/utils/method_definition_scanner.rb', line 76 def body MethodBody.new(self) end |