Class: Conductor::DeferredExport
- Inherits:
-
Object
- Object
- Conductor::DeferredExport
- Defined in:
- lib/conductor/deferred_export.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #export(export_value = nil) ⇒ Object
-
#initialize(options = {}) ⇒ DeferredExport
constructor
A new instance of DeferredExport.
Constructor Details
#initialize(options = {}) ⇒ DeferredExport
Returns a new instance of DeferredExport.
5 6 7 8 9 |
# File 'lib/conductor/deferred_export.rb', line 5 def initialize(={}) @id = .fetch(:id) @callback = .fetch(:callback) @context = .fetch(:context, self) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/conductor/deferred_export.rb', line 3 def id @id end |
Instance Method Details
#export(export_value = nil) ⇒ Object
11 12 13 |
# File 'lib/conductor/deferred_export.rb', line 11 def export(export_value=nil) context.instance_eval { @callback.call export_value } end |