Class: TrickSerial::Serializer::ActiveRecordProxy
- Inherits:
-
Object
- Object
- TrickSerial::Serializer::ActiveRecordProxy
- Includes:
- ObjectProxy
- Defined in:
- lib/trick_serial/serializer.rb
Overview
module
Instance Attribute Summary
Attributes included from ObjectProxy
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ObjectProxy
included, #initialize, #object=, #resolve_class
Class Method Details
.can_proxy?(obj) ⇒ Boolean
321 322 323 |
# File 'lib/trick_serial/serializer.rb', line 321 def self.can_proxy?(obj) obj.id end |
Instance Method Details
#object ⇒ Object
325 326 327 328 329 330 |
# File 'lib/trick_serial/serializer.rb', line 325 def object # STDERR.puts "#{self}#object find #{@cls.inspect} #{@id.inspect}" unless @object @object ||= resolve_class.find(@id) || (raise Error::DisappearingObject, "#{@cls.inspect} #{@id.inspect}") end |