lib/surrounded/context/role_builders.rb in surrounded-0.9.10 vs lib/surrounded/context/role_builders.rb in surrounded-0.9.11
- old
+ new
@@ -10,9 +10,13 @@
end
end
module RoleBuilders
+ def self.extended(base)
+ Surrounded::Exceptions.define(base, exceptions: :InvalidRoleType)
+ end
+
# Define behaviors for your role players
def role(name, type=default_role_type, &block)
if type == :module
mod_name = RoleName(name)
mod = Module.new(&block).send(:include, ::Surrounded)
\ No newline at end of file