Class: Humanoid::Matchers::Default
- Defined in:
- lib/humanoid/matchers/default.rb
Instance Method Summary collapse
-
#initialize(attribute) ⇒ Default
constructor
Creating a new matcher only requires the value.
-
#matches?(value) ⇒ Boolean
Return true if the attribute and value are equal.
Constructor Details
#initialize(attribute) ⇒ Default
Creating a new matcher only requires the value.
6 7 8 |
# File 'lib/humanoid/matchers/default.rb', line 6 def initialize(attribute) @attribute = attribute end |
Instance Method Details
#matches?(value) ⇒ Boolean
Return true if the attribute and value are equal.
10 11 12 |
# File 'lib/humanoid/matchers/default.rb', line 10 def matches?(value) @attribute == value end |