Class: Hamachi::Model::PositiveOrZeroMatcher
- Defined in:
- lib/hamachi/model.rb
Overview
FIXME: make this matcher class a module that can be included here
Instance Method Summary collapse
Methods inherited from Matcher
#default_value, #from_snapshot, #initialize, #initialize_options
Constructor Details
This class inherits a constructor from Hamachi::Model::Matcher
Instance Method Details
#===(value) ⇒ Object
273 274 275 |
# File 'lib/hamachi/model.rb', line 273 def ===(value) @type === value && !value.negative? end |
#to_s ⇒ Object
277 278 279 |
# File 'lib/hamachi/model.rb', line 277 def to_s "positive_or_zero(#{@type})" end |