Class: ArgConsumer
Instance Method Summary collapse
Methods inherited from Consumer
Constructor Details
This class inherits a constructor from Consumer
Instance Method Details
#can_consume?(tokens) ⇒ Boolean
13 14 15 16 17 18 19 20 21 |
# File 'lib/nrser/labs/lots/consumer.rb', line 13 def can_consume? tokens return 0 unless consumed.empty? if tokens[0][0] == '-' 0 else 1 end end |