Class: MethodSig::Origin
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.
180 181 182 183 |
# File 'lib/methodsig.rb', line 180 def initialize(file, line) @file = file @line = line end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
178 179 180 |
# File 'lib/methodsig.rb', line 178 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
178 179 180 |
# File 'lib/methodsig.rb', line 178 def line @line end |
Instance Method Details
#to_s ⇒ Object
185 186 187 |
# File 'lib/methodsig.rb', line 185 def to_s return "#{file}:#{line}" end |