    # File lib/chef/knife/core/object_loader.rb, line 53
            def object_from_file(filename)
              case filename
              when /\.(js|json)$/
                Chef::JSONCompat.from_json(IO.read(filename))
              when /\.rb$/
                r = klass.new
                r.from_file(filename)
                r
              else
                ui.fatal("File must end in .js, .json, or .rb")
                exit 30
              end
            end