Method: Mrubyc::Test::Generator::Double#method_missing

Defined in:
lib/mrubyc/test/generator/double.rb

#method_missing(method_name, *args) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/mrubyc/test/generator/double.rb', line 19

def method_missing(method_name, *args)
  param_size = args[0] || 0
  @@double_method_locations << {
    type: @type,
    class: @klass,
    method_name: method_name,
    args: args.to_s,
    method_parameters: Array.new(param_size).map.with_index{|_, i| ('a'.ord + i).chr }.join(','),
    block: (block_given? ? yield : nil),
    label: @location.label,
    path: @location.absolute_path || @location.path,
    line: @location.lineno
  }
end