alexpeachey / end_state

A State Machine implementation
MIT License
9 stars 5 forks source link

Add StateMachine#current_state? predicate method. #5

Closed brianvh closed 10 years ago

brianvh commented 10 years ago

Need to return early from StateMachine#method_missing if we're performing a state predicate check. Originally, the check happened after performing the event lookup, but this would prevent predicate checks, if the state matched an event and that even couldn't transition.

This commit fixes this problem and includes a regression unit spec.

alexpeachey commented 10 years ago

Added to 0.3.2