class Wongi::Engine::AssertingTest
Public Class Methods
new(*vars, &body)
click to toggle source
# File lib/wongi-engine/filter/asserting_test.rb, line 5 def initialize *vars, &body @vars = vars @body = body end
Public Instance Methods
passes?(token)
click to toggle source
# File lib/wongi-engine/filter/asserting_test.rb, line 10 def passes? token if @vars.empty? @body.call token else @body.call *( @vars.map { |var| token[var] } ) end end