Class: ActiveRecord::Promise::Complete
- Inherits:
-
ActiveRecord::Promise
- Object
- ActiveRecord::Promise
- ActiveRecord::Promise::Complete
- Defined in:
- lib/active_record/promise.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Complete
constructor
A new instance of Complete.
- #pending? ⇒ Boolean
- #then ⇒ Object
Methods inherited from ActiveRecord::Promise
Constructor Details
permalink #initialize(value) ⇒ Complete
Returns a new instance of Complete.
66 67 68 |
# File 'lib/active_record/promise.rb', line 66 def initialize(value) @value = value end |
Instance Attribute Details
permalink #value ⇒ Object (readonly)
Returns the value of attribute value.
64 65 66 |
# File 'lib/active_record/promise.rb', line 64 def value @value end |
Instance Method Details
permalink #pending? ⇒ Boolean
74 75 76 |
# File 'lib/active_record/promise.rb', line 74 def pending? false end |
permalink #then ⇒ Object
[View source]
70 71 72 |
# File 'lib/active_record/promise.rb', line 70 def then Complete.new(yield @value) end |