class Moguro::MethodReference
MethodReference
represents original method reference that was decorated by contracts.ruby. Used for instance methods. This class borrowed many source code from github.com/egonSchiele/contracts.ruby
Attributes
name[R]
Public Class Methods
new(method)
click to toggle source
name - name of the method method - method object
# File lib/moguro/method_reference.rb, line 13 def initialize(method) @name = method.name @method = method end
Public Instance Methods
parameters()
click to toggle source
# File lib/moguro/method_reference.rb, line 28 def parameters @method.parameters end
position()
click to toggle source
Returns method_position, delegates to Support.method_position
# File lib/moguro/method_reference.rb, line 19 def position file, line = @method.source_location if file.nil? || line.nil? '' else "#{file}:#{line}" end end