make attributes available outside sof (iw as module funtion)

This commit is contained in:
Torsten Ruger 2014-08-19 22:39:58 +03:00
parent 9d5f62eded
commit 28b4344ef9

View File

@ -15,9 +15,11 @@ module Sof
end end
def attributes_for object def attributes_for object
Sof::Util.attributes(object)
end
def self.attributes( object )
atts = object.instance_variables.collect{|i| i.to_s[1..-1].to_sym } # chop of @ atts = object.instance_variables.collect{|i| i.to_s[1..-1].to_sym } # chop of @
atts - Volotile.attributes(object.class) atts - Volotile.attributes(object.class)
end end
end end
end end