8 # Generate a Behavior of the given kind. The proper class is found by camel casing the
9 # kind (which is given as an underscored symbol).
10 # +kind+ is the underscored symbol representing the class (e.g. foo_bar for God::Behaviors::FooBar)
11 def self.generate(kind, watch)
12 sym = kind.to_s.capitalize.gsub(/_(.)/){$1.upcase}.intern
13 b = God::Behaviors.const_get(sym).new
17 raise NoSuchBehaviorError.new("No Behavior found with the class name God::Behaviors::#{sym}")
44 # Construct the friendly name of this Behavior, looks like:
46 # Behavior FooBar on Watch 'baz'
48 "Behavior " + super + " on Watch '#{self.watch.name}'"