You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: javascript.rb
    path of file: ./repos/origami/lib/origami
    
    the code of the file until where you have to start completion: =begin

    This file is part of Origami, PDF manipulation framework for Ruby
    Copyright (C) 2016	Guillaume Delugr√©.

    Origami is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the Li
    
                    def self.check_method_named_args(object, def_args)
                        members = object.entries.map {|k, _| k}
                        argv = []
                        def_args.each do |def_arg|
                            raise MissingArgError if def_arg.required and not members.include?(def_arg.name)

                            if members.include?(def_arg.name)
                                arg = object[def_arg.name]
                                raise TypeError if def_arg.type and not arg.is_a?(def_arg.type)
                            else
                                arg = def_arg.default
                            end

                            argv.push(arg)
                        end