Class: BackgrounDRb::Result

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

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ Result

Returns a new instance of Result.



3
4
5
# File 'lib/backgroundrb/bdrb_result.rb', line 3

def initialize results
  @results = resuls
end

Instance Method Details

#async_response?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/backgroundrb/bdrb_result.rb', line 7

def async_response?
  !(@results[:result] == true)
end

#error?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/backgroundrb/bdrb_result.rb', line 15

def error?
  !(@results[:result_flag] == "ok")
end

#sync_response?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/backgroundrb/bdrb_result.rb', line 11

def sync_response?
  (@results[:result] == true)
end