class Andromeda::Kit::Targeting::Reducer

Attributes

reducer[RW]
state[RW]

Public Instance Methods

on_enter(key, val) click to toggle source
# File lib/andromeda/kit.rb, line 120
def on_enter(key, val)
  reducer_ = reducer

  state_   = state
  new_     = reducer_.call state_, key, val
  unless new_ == state_
    state = new_
    new_state << state if new_state
  end
end