Method: Tabletop::TokenStack#add
- Defined in:
- lib/tabletop/token.rb
#add(n = 1) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/tabletop/token.rb', line 40 def add(n = 1) raise ArgumentError unless n.respond_to?(:to_i) raise ArgumentError if n < 0 n = n.to_i raise_if_over_max(n + @count) @count += n end |