lib/zertico/accessor.rb in zertico-0.3.0 vs lib/zertico/accessor.rb in zertico-0.3.1

- old
+ new

@@ -3,11 +3,14 @@ def initialize(object) instance_variable_set("@#{interface_name}", object) end def self.find(id) - instance_variable_set("@#{interface_name}", interface_class.find(id)) - self + new(interface_class.find(id)) + end + + def interface + instance_variable_get("@#{interface_name}") end def method_missing(method_name, *args) if instance_variable_get("@#{interface_name}").respond_to?(method_name) return instance_variable_get("@#{interface_name}").send(method_name, *args) \ No newline at end of file