Class: Aqua::FileStub
Instance Attribute Summary collapse
-
#attachment_id ⇒ Object
Returns the value of attribute attachment_id.
-
#base_class ⇒ Object
Returns the value of attribute base_class.
-
#base_id ⇒ Object
Returns the value of attribute base_id.
Attributes inherited from Stub
#delegate, #delegate_class, #delegate_id, #parent_object, #path_from_parent
Class Method Summary collapse
-
.aqua_init(init, opts) ⇒ Object
This is what is actually called in the Aqua unpack process.
Instance Method Summary collapse
-
#initialize(opts) ⇒ FileStub
constructor
A new instance of FileStub.
Constructor Details
#initialize(opts) ⇒ FileStub
Returns a new instance of FileStub.
63 64 65 66 67 68 |
# File 'lib/aqua/object/stub.rb', line 63 def initialize( opts ) super( opts ) self.base_class = opts[:base_object].class self.base_id = opts[:base_id] self. = opts[:id] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Aqua::Stub
Instance Attribute Details
#attachment_id ⇒ Object
Returns the value of attribute attachment_id.
61 62 63 |
# File 'lib/aqua/object/stub.rb', line 61 def @attachment_id end |
#base_class ⇒ Object
Returns the value of attribute base_class.
61 62 63 |
# File 'lib/aqua/object/stub.rb', line 61 def base_class @base_class end |
#base_id ⇒ Object
Returns the value of attribute base_id.
61 62 63 |
# File 'lib/aqua/object/stub.rb', line 61 def base_id @base_id end |
Class Method Details
.aqua_init(init, opts) ⇒ Object
This is what is actually called in the Aqua unpack process
71 72 73 74 75 |
# File 'lib/aqua/object/stub.rb', line 71 def self.aqua_init( init, opts ) init['base_object'] = opts.base_object init['base_id'] = opts.base_id || opts.base_object.id # this is needed when an object is loaded, not reloaded super end |