Class: AsyncPartial::AsyncResult

Inherits:
Object
  • Object
show all
Defined in:
lib/async_partial.rb

Instance Method Summary collapse

Constructor Details

#initialize(thread) ⇒ AsyncResult

Returns a new instance of AsyncResult.



67
68
69
# File 'lib/async_partial.rb', line 67

def initialize(thread)
  @thread = thread
end

Instance Method Details

#html_safe?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'lib/async_partial.rb', line 75

def html_safe?
  true
end

#nil?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/async_partial.rb', line 71

def nil?
  false
end

#to_sObject



79
80
81
# File 'lib/async_partial.rb', line 79

def to_s
  self
end

#valueObject



83
84
85
86
87
# File 'lib/async_partial.rb', line 83

def value
  val = @thread.value
  @thread.kill
  val
end