From 491e51c74adcf926ae3c52f4f2206f4cee8933fe Mon Sep 17 00:00:00 2001 From: Aaron Pfeifer Date: Wed, 4 Mar 2009 21:45:26 -0500 Subject: [PATCH] More doc tweaks --- lib/state_machine/guard.rb | 2 +- lib/state_machine/machine.rb | 8 ++++---- lib/state_machine/transition.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/state_machine/guard.rb b/lib/state_machine/guard.rb index 6bd27490..04f6a45e 100644 --- a/lib/state_machine/guard.rb +++ b/lib/state_machine/guard.rb @@ -180,7 +180,7 @@ def build_matcher(options, whitelist_option, blacklist_option) end # Verifies that all configured requirements (event and state) match the - # given query. If a match is return, then a hash containing the + # given query. If a match is found, then a hash containing the # event/state requirements that passed will be returned; otherwise, nil. def match_query(query) query ||= {} diff --git a/lib/state_machine/machine.rb b/lib/state_machine/machine.rb index bf6ee928..2f9dec22 100644 --- a/lib/state_machine/machine.rb +++ b/lib/state_machine/machine.rb @@ -44,7 +44,7 @@ module StateMachine # example, # # class Vehicle - # state_machine, :initial => :parked do + # state_machine :initial => :parked do # before_transition any => :idling, :do => lambda {|vehicle| throw :halt} # ... # end @@ -454,7 +454,7 @@ def initial_state(object) # # == Behaviors # - # Behaviors defined a series of methods to mixin with objects when the current + # Behaviors define a series of methods to mixin with objects when the current # state matches the given one(s). This allows instance methods to behave # a specific way depending on what the value of the object's state is. # @@ -569,7 +569,7 @@ def initial_state(object) # This functionality is not library-specific and can work for any class-level # method that is defined like so: # - # def validates_presence_of(args, options = {}) + # def validates_presence_of(attribute, options = {}) # ... # end # @@ -597,7 +597,7 @@ def state(*names, &block) # Determines whether the given object is in a specific state. If the # object's current value doesn't match the state, then this will return # false, otherwise true. If the given state is unknown, then an ArgumentError - # exception will be raised. + # will be raised. # # == Examples # diff --git a/lib/state_machine/transition.rb b/lib/state_machine/transition.rb index ae18d257..802f3b6f 100644 --- a/lib/state_machine/transition.rb +++ b/lib/state_machine/transition.rb @@ -16,7 +16,7 @@ class Transition # The state machine for which this transition is defined attr_reader :machine - # The event that caused the transition + # The event that triggered the transition attr_reader :event # The original state value *before* the transition