Module: Draco::State
- Defined in:
- lib/draco/state.rb
Defined Under Namespace
Modules: ClassMethods, EntityPlugin Classes: InvalidDefaultError, NoStatesDefinedError, NotAnEntityError, StateExistsError, StateNotSetError
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/draco/state.rb', line 11 def self.included(mod) raise NotAnEntityError, "Draco::State can only be included on Draco::Entity subclasses." unless mod.ancestors.include?(Draco::Entity) mod.extend(ClassMethods) mod.prepend(EntityPlugin) end |