Class: Ector::Multi::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ector-multi/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results, error = nil) ⇒ Result

Returns a new instance of Result.



8
9
10
11
# File 'lib/ector-multi/result.rb', line 8

def initialize(results, error = nil)
  @results = results
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



6
7
8
# File 'lib/ector-multi/result.rb', line 6

def error
  @error
end

#resultsObject (readonly)

Returns the value of attribute results.



6
7
8
# File 'lib/ector-multi/result.rb', line 6

def results
  @results
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ector-multi/result.rb', line 17

def failure?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ector-multi/result.rb', line 13

def success?
  !@error
end