class EventQ::SerializationProviders::JRuby::Oj::AttributeWriter
Public Class Methods
descendants()
click to toggle source
# File lib/eventq_base/serialization_providers/jruby/oj/attribute_writer.rb, line 12 def self.descendants descendants = [] ObjectSpace.each_object(singleton_class) do |k| next if k.singleton_class? descendants.unshift k unless k == self end descendants end
exec(obj)
click to toggle source
# File lib/eventq_base/serialization_providers/jruby/oj/attribute_writer.rb, line 7 def self.exec(obj) aw = descendants.detect { |a| a.new.valid?(obj) } || ClassWriter aw.new.exec(obj) end