Class: RSpec::Mockbidden::ForbiddanceTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mockbidden/methods.rb

Direct Known Subclasses

AnyForbiddanceTarget

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ ForbiddanceTarget

Returns a new instance of ForbiddanceTarget.



8
9
10
11
# File 'lib/rspec/mockbidden/methods.rb', line 8

def initialize(target)
  @target = target
  @matcher = nil
end

Instance Attribute Details

#matcherObject (readonly)

Returns the value of attribute matcher.



6
7
8
# File 'lib/rspec/mockbidden/methods.rb', line 6

def matcher
  @matcher
end

#targetObject (readonly)

Returns the value of attribute target.



6
7
8
# File 'lib/rspec/mockbidden/methods.rb', line 6

def target
  @target
end

Instance Method Details

#from(matcher) ⇒ Object



13
14
15
# File 'lib/rspec/mockbidden/methods.rb', line 13

def from(matcher)
  @matcher = matcher
end

#targets_any_instance?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rspec/mockbidden/methods.rb', line 17

def targets_any_instance?
  false
end