Class: MethodOrigin::Origin
- Inherits:
-
Object
- Object
- MethodOrigin::Origin
- Defined in:
- lib/decompiler/method/origin.rb
Overview
An abstraction for a method origin.
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(file, line) ⇒ Origin
constructor
A new instance of Origin.
- #to_s ⇒ Object
Constructor Details
#initialize(file, line) ⇒ Origin
Returns a new instance of Origin.
6 7 8 9 |
# File 'lib/decompiler/method/origin.rb', line 6 def initialize(file, line) @file = file @line = line end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
4 5 6 |
# File 'lib/decompiler/method/origin.rb', line 4 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
4 5 6 |
# File 'lib/decompiler/method/origin.rb', line 4 def line @line end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/decompiler/method/origin.rb', line 11 def to_s return "#{file}:#{line}" end |