Class: Azebiki::Checker::MatcherProxy
- Inherits:
-
Object
- Object
- Azebiki::Checker::MatcherProxy
- Defined in:
- lib/azebiki/azebiki.rb
Instance Method Summary collapse
- #content_message ⇒ Object
- #failure_message(new_failure_message) ⇒ Object
-
#initialize(have_matcher) ⇒ MatcherProxy
constructor
A new instance of MatcherProxy.
- #matches?(content) ⇒ Boolean
- #message ⇒ Object
Constructor Details
#initialize(have_matcher) ⇒ MatcherProxy
Returns a new instance of MatcherProxy.
141 142 143 144 |
# File 'lib/azebiki/azebiki.rb', line 141 def initialize(have_matcher) @have_matcher = have_matcher @failure_message = "Content should have included #{}, but did not" end |
Instance Method Details
#content_message ⇒ Object
150 151 152 153 154 155 156 |
# File 'lib/azebiki/azebiki.rb', line 150 def if @have_matcher.respond_to?(:tag_inspect) @have_matcher.tag_inspect else @have_matcher. end end |
#failure_message(new_failure_message) ⇒ Object
146 147 148 |
# File 'lib/azebiki/azebiki.rb', line 146 def () @failure_message = .gsub(/:tag/, ) end |
#matches?(content) ⇒ Boolean
158 159 160 |
# File 'lib/azebiki/azebiki.rb', line 158 def matches?(content) @have_matcher.matches?(content) end |
#message ⇒ Object
162 163 164 |
# File 'lib/azebiki/azebiki.rb', line 162 def @failure_message end |