Module: Chione
- Extended by:
- Loggability
- Defined in:
- lib/chione.rb,
lib/chione/mixins.rb
Overview
An Entity/Component System inspired by Artemis
Defined Under Namespace
Modules: Archetype, DataUtilities, Fixtures, Inspection, MethodUtilities Classes: Aspect, Component, Entity, IteratingSystem, Manager, System, World
Constant Summary collapse
- VERSION =
Gem version
'0.12.0'
Class Attribute Summary collapse
-
.uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Class Method Summary collapse
-
.Component(object, init_values = {}) ⇒ Object
Coerce the specified
objectinto a Chione::Component and return it. -
.const_missing(name) ⇒ Object
Warn about deprecated constants.
Class Attribute Details
.uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
36 37 38 |
# File 'lib/chione.rb', line 36 def uuid @uuid end |
Class Method Details
.Component(object, init_values = {}) ⇒ Object
Coerce the specified object into a Chione::Component and return it.
41 42 43 44 45 46 |
# File 'lib/chione.rb', line 41 def self::Component( object, init_values={} ) return object if object.is_a?( Chione::Component ) return Chione::Component.create( object, init_values ) if object.is_a?( Class ) || object.is_a?( String ) || object.is_a?( Symbol ) raise TypeError, "can't convert %p into Chione::Component" % [ object.class ] end |
.const_missing(name) ⇒ Object
Warn about deprecated constants.
50 51 52 53 54 55 56 |
# File 'lib/chione.rb', line 50 def self::const_missing( name ) return super unless name == :Assemblage warn "Chione::Assemblage has been renamed to Chione::Archetype. " \ "This alias will be removed before 1.0\n" \ "Used at #{caller(1).first}" return Chione::Archetype end |