Module: Canned::Context::Matchers::Equality
- Included in:
- Value
- Defined in:
- lib/canned/context/matchers/equality.rb
Instance Method Summary collapse
-
#equal_to(_options = {}) ⇒ Object
Returns true if a given value equals current context value.
-
#greater_than(_options = {}) ⇒ Object
Works the same as equal_to but performs a greater_than comparison.
-
#less_than(_options = {}) ⇒ Object
Works the same as equal_to but performs a less_than comparison.
Instance Method Details
#equal_to(_options = {}) ⇒ Object
Returns true if a given value equals current context value.
12 13 14 15 |
# File 'lib/canned/context/matchers/equality.rb', line 12 def equal_to(={}) return false unless indeed? @stack.top == _equality_load_value() end |
#greater_than(_options = {}) ⇒ Object
Works the same as equal_to but performs a greater_than comparison
18 19 20 21 |
# File 'lib/canned/context/matchers/equality.rb', line 18 def greater_than(={}) return false unless indeed? @stack.top > _equality_load_value() end |
#less_than(_options = {}) ⇒ Object
Works the same as equal_to but performs a less_than comparison
24 25 26 27 |
# File 'lib/canned/context/matchers/equality.rb', line 24 def less_than(={}) return false unless indeed? @stack.top < _equality_load_value() end |