An Entity/Component System inspired by Artemis
Component( object, init_values={} )
Coerce the specified object into a Chione::Component and return it.
41 def self::Component( object, init_values={} )
42 return object if object.is_a?( Chione::Component )
43 return Chione::Component.create( object, init_values ) if
44 object.is_a?( Class ) || object.is_a?( String ) || object.is_a?( Symbol )
45 raise TypeError, "can't convert %p into Chione::Component" % [ object.class ]
46 end
Warn about deprecated constants.
50 def self::const_missing( name )
51 return super unless name == :Assemblage
52 warn "Chione::Assemblage has been renamed to Chione::Archetype. " \
53 "This alias will be removed before 1.0\n" \
54 "Used at #{caller(1).first}"
55 return Chione::Archetype
56 end