123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::FutureResult::Complete

Relationships & Source Files
Inherits: Object
Defined in: activerecord/lib/active_record/future_result.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(result) ⇒ Complete

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 9

def initialize(result)
  @result = result
end

Instance Attribute Details

#canceled?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 17

def canceled?
  false
end

#pending?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 13

def pending?
  false
end

#result (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 6

attr_reader :result

Instance Method Details

#empty?Boolean

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 7

delegate :empty?, :to_a, to: :result

#then(&block)

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 21

def then(&block)
  Promise::Complete.new(@result.then(&block))
end

#to_a

[ GitHub ]

  
# File 'activerecord/lib/active_record/future_result.rb', line 7

delegate :empty?, :to_a, to: :result