# File lib/occi/core/mixins.rb, line 18 def <<(mixin) mixin = convert mixin @entity.attributes.merge! mixin.attributes.convert if @entity super mixin end
# File lib/occi/core/mixins.rb, line 7 def entity=(entity) self.each { |mixin| entity.attributes.merge! mixin.attributes.convert } @entity = entity end
# File lib/occi/core/mixins.rb, line 12 def remove(mixin) mixin = convert mixin @entity.attributes.remove mixin.attributes if @entity self.delete mixin end
TODO: fix mixin conversion
# File lib/occi/core/mixins.rb, line 27 def convert(mixin) mixin = super mixin if mixin.kind_of? String mixin = Occi::Core::Mixin.new *mixin.split('#') end mixin end