Class: RSpec::ChangeToNow::Matchers::AsMatcher Private
- Inherits:
-
Matchers::MatcherDelegator
- Object
- Matchers::MatcherDelegator
- RSpec::ChangeToNow::Matchers::AsMatcher
- Includes:
- Matchers::Composable
- Defined in:
- lib/rspec/change_to_now/matchers/as_matcher.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Decorator that wraps a matcher and raises a syntax error if the matcher is not a matcher.
Instance Method Summary collapse
-
#initialize(expected) ⇒ AsMatcher
constructor
private
A new instance of AsMatcher.
Constructor Details
#initialize(expected) ⇒ AsMatcher
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AsMatcher.
12 13 14 15 |
# File 'lib/rspec/change_to_now/matchers/as_matcher.rb', line 12 def initialize(expected) expected = RSpec::Matchers::BuiltIn::Match.new(expected) unless RSpec::Matchers.is_a_matcher?(expected) super(expected) end |