Method: MGit::Command#check_arity

Defined in:
lib/mgit/command.rb

#check_arity(args) ⇒ Object



37
38
39
40
41
# File 'lib/mgit/command.rb', line 37

def check_arity(args)
  arity_min, arity_max = arity
  fail TooFewArgumentsError, self if arity_min && args.size < arity_min
  fail TooManyArgumentsError, self if arity_max && args.size > arity_max
end