Class: Jade::Task::OnError

Inherits:
Data
  • Object
show all
Includes:
Jade::Task
Defined in:
lib/jade/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fnObject (readonly)

Returns the value of attribute fn

Returns:

  • (Object)

    the current value of fn



43
44
45
# File 'lib/jade/task.rb', line 43

def fn
  @fn
end

#taskObject (readonly)

Returns the value of attribute task

Returns:

  • (Object)

    the current value of task



43
44
45
# File 'lib/jade/task.rb', line 43

def task
  @task
end

Instance Method Details

#runObject



46
47
48
49
50
51
# File 'lib/jade/task.rb', line 46

def run
  case task.run
  in Jade::Result::Ok => ok    then ok
  in Jade::Result::Err[error]  then fn.call(error).run
  end
end