Class: Jade::Task::AndThen

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



32
33
34
# File 'lib/jade/task.rb', line 32

def fn
  @fn
end

#taskObject (readonly)

Returns the value of attribute task

Returns:

  • (Object)

    the current value of task



32
33
34
# File 'lib/jade/task.rb', line 32

def task
  @task
end

Instance Method Details

#runObject



35
36
37
38
39
40
# File 'lib/jade/task.rb', line 35

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