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.
110 111 112 113 |
# File 'lib/azebiki/azebiki.rb', line 110 def initialize(have_matcher) @have_matcher = have_matcher @failure_message = "Content should have included #{}, but did not" end |
Instance Method Details
#content_message ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/azebiki/azebiki.rb', line 119 def if @have_matcher.respond_to?(:tag_inspect) @have_matcher.tag_inspect else @have_matcher. end end |
#failure_message(new_failure_message) ⇒ Object
115 116 117 |
# File 'lib/azebiki/azebiki.rb', line 115 def () @failure_message = .gsub(/:tag/, ) end |
#matches?(content) ⇒ Boolean
127 128 129 |
# File 'lib/azebiki/azebiki.rb', line 127 def matches?(content) @have_matcher.matches?(content) end |
#message ⇒ Object
131 132 133 |
# File 'lib/azebiki/azebiki.rb', line 131 def @failure_message end |