Class: Id
- Inherits:
-
Expression
- Object
- Expression
- Id
- Defined in:
- lib/interpreter.rb
Instance Method Summary collapse
-
#evaluate(tickets, id) ⇒ Object
Searches tickets by id.
Instance Method Details
#evaluate(tickets, id) ⇒ Object
Searches tickets by id
43 44 45 46 47 |
# File 'lib/interpreter.rb', line 43 def evaluate(tickets, id) returning result = [] do tickets.each { |t| result.push(t) if t.id == id } end end |