Class: Collective::Messager::Counter
- Inherits:
-
Object
- Object
- Collective::Messager::Counter
- Defined in:
- lib/collective/messager.rb
Instance Method Summary collapse
Instance Method Details
#fail ⇒ Object
160 161 162 163 |
# File 'lib/collective/messager.rb', line 160 def fail @value = nil raise NoMatch end |
#match ⇒ Object
156 157 158 159 |
# File 'lib/collective/messager.rb', line 156 def match @value ||= 0 @value += 1 end |
#value ⇒ Object
164 165 166 167 |
# File 'lib/collective/messager.rb', line 164 def value raise NoMatch if !@value @value end |