Class: Interact::Progress::Skipper

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

Instance Method Summary collapse

Constructor Details

#initialize(&ret) ⇒ Skipper

Returns a new instance of Skipper.



60
61
62
# File 'lib/interact/progress.rb', line 60

def initialize(&ret)
  @return = ret
end

Instance Method Details

#fail(&callback) ⇒ Object



72
73
74
# File 'lib/interact/progress.rb', line 72

def fail(&callback)
  @return.call("FAILED", :error, callback)
end

#give_up(&callback) ⇒ Object



68
69
70
# File 'lib/interact/progress.rb', line 68

def give_up(&callback)
  @return.call("GAVE UP", :bad, callback)
end

#skip(&callback) ⇒ Object



64
65
66
# File 'lib/interact/progress.rb', line 64

def skip(&callback)
  @return.call("SKIPPED", :warning, callback)
end