Method: Definition#set

Defined in:
lib/definition.rb

#set(arg_types) ⇒ Object



68
69
70
71
72
73
74
75
76
# File 'lib/definition.rb', line 68

def set(arg_types)
  @arg_types = arg_types
  @arity = arg_types.length
  if arg_types.last == Const::Block
    @arity -= 1
    @block = true
  end
  @arity = -@arity if arg_types.include?(Const::Rest)
end