module SmsGlobal::Object::Helper
Public Instance Methods
object(object_name, *params)
click to toggle source
# File lib/sms_global/object/helper.rb, line 4 def object(object_name, *params) define_method(object_name) do |argument=nil| object = "@#{object_name}_cache".to_sym if !instance_variable_defined?(object) instance_variable_set(object, SmsGlobal::Object.const_get("#{object_name.to_s.to_camel_case(true)}".to_sym).new(self)) end instance_variable_get(object) end end