Skip to content

Revisit load/dump methods feature #28

@delano

Description

@delano

Some leftovers related to dump_method and load_method

if value_to_distunguish.is_a?(Familia::Horreum)
  Familia.trace :DISTINGUISHER, redis, "horreum", caller(1..1) if Familia.debug?
  value_to_distunguish.identifier
elsif dump_method && value_to_distunguish.respond_to?(dump_method)
  Familia.trace :DISTINGUISHER, redis, "#{value_to_distunguish.class}##{dump_method}", caller(1..1) if Familia.debug?
  value_to_distunguish.send(dump_method)
else
  if dump_method
    msg = if dump_method.to_s.empty?
      "No dump_method available for #{value_to_distunguish.class}"
    else
      "No such method: #{value_to_distunguish.class}##{dump_method}"
    end
    raise Familia::Problem, msg
  else
    Familia.trace :DISTINGUISHER, redis, "else", caller(1..1) if Familia.debug?
    nil
  end
end


if ret.nil? && dump_method && val.respond_to?(dump_method)
  Familia.trace :TOREDIS, redis, "#{val.class}##{dump_method}", caller(1..1) if Familia.debug?
  val.send dump_method
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions