Method: Otaku::Handler::Processor::MagicProc#code_match_args

Defined in:
lib/otaku/handler/processor.rb

#code_match_argsObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/otaku/handler/processor.rb', line 45

def code_match_args
  @cache[:code_match_args] ||= (
    arg_idx, marker_idx = 5, 3
    args = source_code.match(code_regexp)
    while args && prob_regexp =~ args[1]
      arg_idx, marker_idx = 4, 2
      args = source_code.match(revised_regexp(args[1]))
    end
    {
      :ignore => args[1],
      :start_marker => args[marker_idx],
      :arg => args[arg_idx]
    }
  )
end