rlibs/chassis.rb
# Verify that the required args are met for the given method call
#   +method+ is the Symbol representing the method name
#   +args+ is the Ruby-style args to check
#
# Returns nothing
# Raises on verification failure
Verify that the required args are met for the given method call
+method+ is the Symbol representing the method name
+args+ is the Ruby-style args to check

Returns nothing
Raises on verification failure
Verify that the required args are met for the given method call + method + is the Symbol representing the method name + args + is the Ruby - style args to check Returns nothing Raises on verification failure
def verify_args(method, args)
    matches = Chassis.signatures[method].select do |key|
      args[key]
    end
    misses = Chassis.signatures[method] - matches
    unless misses.empty?
      raise "Required arguments missing for '#{method}': #{misses.join(", ")}"
    end
  end
def verify_args ( method , args ) matches = Chassis . signatures [ method ] . select do | key | args [ key ] end misses = Chassis . signatures [ method ] - matches unless misses . empty? raise "Required arguments missing for '#{method}': #{misses.join(", ")}" end end
Verify that the required args are met for the given method call
+method+ is the Symbol representing the method name
+args+ is the Ruby-style args to check
Verify that the required args are met for the given method call + method + is the Symbol representing the method name + args + is the Ruby - style args to check
method
args