Class: Matchi::Change::From
- Inherits:
-
Object
- Object
- Matchi::Change::From
- Defined in:
- lib/matchi/change/from.rb,
lib/matchi/change/from/to.rb
Overview
*Change from to* wrapper.
Defined Under Namespace
Classes: To
Instance Method Summary collapse
-
#initialize(expected, &state) ⇒ From
constructor
Initialize the wrapper with an object and a block.
-
#to(expected_new_value) ⇒ #match?
Specifies the new value to expect.
Constructor Details
#initialize(expected, &state) ⇒ From
Initialize the wrapper with an object and a block.
21 22 23 24 25 26 |
# File 'lib/matchi/change/from.rb', line 21 def initialize(expected, &state) raise ::ArgumentError, "a block must be provided" unless block_given? @expected = expected @state = state end |