Class: Warg::Executor::Deferred::CallbacksQueue::Outcome

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(outcome) ⇒ Outcome

Returns a new instance of Outcome.



1704
1705
1706
1707
1708
# File 'lib/warg.rb', line 1704

def initialize(outcome)
  @source_outcome = outcome
  @host = @source_outcome.host
  @successful = true
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



1699
1700
1701
# File 'lib/warg.rb', line 1699

def error
  @error
end

#hostObject (readonly)

Returns the value of attribute host.



1700
1701
1702
# File 'lib/warg.rb', line 1700

def host
  @host
end

#source_outcomeObject (readonly)

Returns the value of attribute source_outcome.



1701
1702
1703
# File 'lib/warg.rb', line 1701

def source_outcome
  @source_outcome
end

#valueObject

Returns the value of attribute value.



1702
1703
1704
# File 'lib/warg.rb', line 1702

def value
  @value
end

Instance Method Details

#fail!(message) ⇒ Object



1714
1715
1716
1717
1718
# File 'lib/warg.rb', line 1714

def fail!(message)
  @successful = false

  raise CallbackFailedError.new(message)
end

#failed?Boolean

Returns:

  • (Boolean)


1729
1730
1731
# File 'lib/warg.rb', line 1729

def failed?
  !successful?
end

#failure_summaryObject



1733
1734
1735
# File 'lib/warg.rb', line 1733

def failure_summary
  error && error.full_message
end

#resolve(value) ⇒ Object



1710
1711
1712
# File 'lib/warg.rb', line 1710

def resolve(value)
  @value = value
end

#successful?Boolean

Returns:

  • (Boolean)


1725
1726
1727
# File 'lib/warg.rb', line 1725

def successful?
  @successful
end