Class: Ramcrest::SuchThat::Matcher
- Inherits:
-
Object
- Object
- Ramcrest::SuchThat::Matcher
- Includes:
- Matcher
- Defined in:
- lib/ramcrest/such_that.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
-
#initialize(description, matcher_block) ⇒ Matcher
constructor
A new instance of Matcher.
Methods included from Matcher
#do_match, #matches?, #mismatch, #success
Constructor Details
#initialize(description, matcher_block) ⇒ Matcher
Returns a new instance of Matcher.
16 17 18 19 20 |
# File 'lib/ramcrest/such_that.rb', line 16 def initialize(description, matcher_block) singleton = class << self; self; end singleton.send(:define_method, :matches?, matcher_block) @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
14 15 16 |
# File 'lib/ramcrest/such_that.rb', line 14 def description @description end |