Class: Mocktail::Matchers::Captor::Capture
- Extended by:
- T::Sig
- Defined in:
- lib/mocktail/matchers/captor.rb,
lib/mocktail/sorbet/mocktail/matchers/captor.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #captured? ⇒ Boolean
-
#initialize ⇒ Capture
constructor
A new instance of Capture.
- #inspect ⇒ Object
- #match?(actual) ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize ⇒ Capture
Returns a new instance of Capture.
27 28 29 30 |
# File 'lib/mocktail/matchers/captor.rb', line 27 def initialize @value = nil @captured = false end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25 26 27 |
# File 'lib/mocktail/matchers/captor.rb', line 25 def value @value end |
Class Method Details
.matcher_name ⇒ Object
21 22 23 |
# File 'lib/mocktail/matchers/captor.rb', line 21 def self.matcher_name :capture end |
Instance Method Details
#captured? ⇒ Boolean
38 39 40 |
# File 'lib/mocktail/matchers/captor.rb', line 38 def captured? @captured end |
#inspect ⇒ Object
42 43 44 |
# File 'lib/mocktail/matchers/captor.rb', line 42 def inspect "capture" end |
#match?(actual) ⇒ Boolean
32 33 34 35 36 |
# File 'lib/mocktail/matchers/captor.rb', line 32 def match?(actual) @value = actual @captured = true true end |