Class: RackConsole::MockMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/rack_console/mock_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ MockMethod

Returns a new instance of MockMethod.



4
5
6
7
# File 'lib/rack_console/mock_method.rb', line 4

def initialize *args
  @meth, @name, @kind, @owner = args
  @owner ||= @meth.owner
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



3
4
5
# File 'lib/rack_console/mock_method.rb', line 3

def kind
  @kind
end

#methObject

Returns the value of attribute meth.



3
4
5
# File 'lib/rack_console/mock_method.rb', line 3

def meth
  @meth
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rack_console/mock_method.rb', line 3

def name
  @name
end

#ownerObject

Returns the value of attribute owner.



3
4
5
# File 'lib/rack_console/mock_method.rb', line 3

def owner
  @owner
end

Instance Method Details

#instance_method?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rack_console/mock_method.rb', line 8

def instance_method?
  @kind == :i
end

#source_locationObject



11
12
13
# File 'lib/rack_console/mock_method.rb', line 11

def source_location
  @meth.source_location
end