module PIM::DataModuleObject
Protected Class Methods
set_data_module(object, data_module)
click to toggle source
# File pim.rb, line 3545 def self.set_data_module object, data_module if object.is_a?(Class) object.class_exec do self.set_data_module(data_module) end elsif object.is_a?(Module) object.module_exec do self.set_data_module(data_module) end elsif object.is_a?(Object) object.instance_exec do self.set_data_module(data_module) end else raise "Cannot set data module on objects of class #{object.class}" end end
Public Instance Methods
data_module()
click to toggle source
# File pim.rb, line 3539 def data_module @data_module || PIM.active_module end
Protected Instance Methods
set_data_module(data_module)
click to toggle source
# File pim.rb, line 3563 def set_data_module data_module raise "Data module must not be nil" if data_module.nil? raise "Data module is already set" if not @data_module.nil? @data_module = data_module end