Module: Gemmy::Patches::ObjectPatch::InstanceMethods::AttrSingletonReader

Defined in:
lib/gemmy/patches/object_patch.rb

Instance Method Summary collapse

Instance Method Details

#attr_singleton_reader(*args) ⇒ Object

facets



223
224
225
226
227
228
# File 'lib/gemmy/patches/object_patch.rb', line 223

def attr_singleton_reader(*args)
  #h, a = *args.partition{|a| Hash===a}
  (class << self ; self ; end).send( :attr_reader, *args )
  #(class << self ; self ; end).send( :attr_reader, *h.keys )
  #h.each { |k,v| instance_variable_set("@#{k}", v) }
end