Class: Jade::Task::Map

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



21
22
23
# File 'lib/jade/task.rb', line 21

def fn
  @fn
end

#taskObject (readonly)

Returns the value of attribute task

Returns:

  • (Object)

    the current value of task



21
22
23
# File 'lib/jade/task.rb', line 21

def task
  @task
end

Instance Method Details

#runObject



24
25
26
27
28
29
# File 'lib/jade/task.rb', line 24

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