Class: MethodOrigin::Origin

Inherits:
Object
  • Object
show all
Defined in:
lib/decompiler/method/origin.rb

Overview

An abstraction for a method origin.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/decompiler/method/origin.rb', line 4

def file
  @file
end

#lineObject (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_sObject



11
12
13
# File 'lib/decompiler/method/origin.rb', line 11

def to_s
  return "#{file}:#{line}"
end