class Remap::Rule::Map::Required

Public Instance Methods

call(state) click to toggle source

@see Map#call

# File lib/remap/rule/map/required.rb, line 12
def call(state)
  catch_fatal(state, backtrace) do |s0|
    s2 = path.input.call(s0) do |s1|
      callback(rule.call(s1))
    end

    s3 = s2.then(&path.output)
    s4 = s3.merge(path: state.path)

    s4.except(:key)
  end
end