lib/amf/pure/serializer.rb
# unmapped object
#OPTIMIZE: keep a hash of classes that come through here
# and store in a hash keyed by obj.class
# if the obj.class is in the hash, loop over the hash of
# public methods
# find all public methods belonging to this object alone
unmapped object
OPTIMIZE: keep a hash of classes that come through here
and store in a hash keyed by obj.class
if the obj.class is in the hash, loop over the hash of
public methods
find all public methods belonging to this object alone
unmapped object OPTIMIZE : keep a hash of classes that come through here and store in a hash keyed by obj . class if the obj . class is in the hash loop over the hash of public methods find all public methods belonging to this object alone
def serialize_properties(state = nil)
            output = ''
            self.public_methods(false).each do |method_name|
              method_def = self.method(method_name)
              if method_def.arity == 0
                output << method_name.to_s.write_string(state)
                output << self.send(method_name).to_amf(state)
              end
            end
            output
          end
def serialize_properties ( state = nil ) output = '' self . public_methods ( false ) . each do | method_name | method_def = self . method ( method_name ) if method_def . arity == 0 output << method_name . to_s . write_string ( state ) output << self . send ( method_name ) . to_amf ( state ) end end output end
unmapped object
OPTIMIZE: keep a hash of classes that come through here
and store in a hash keyed by obj.class
if the obj.class is in the hash, loop over the hash of
public methods
find all public methods belonging to this object alone
unmapped object OPTIMIZE : keep a hash of classes that come through here and store in a hash keyed by obj . class if the obj . class is in the hash loop over the hash of public methods find all public methods belonging to this object alone
# and write them to the stream if they take no arguments
state
<not_specific>