def requires(*args)
      missing, required = missing_attributes(args)

      if missing.length == 1
        fail(ArgumentError, "#{missing.keys.first} is required for this operation")
      elsif missing.any?
        fail(ArgumentError, "#{missing.keys[0...-1].join(', ')} and #{missing.keys[-1]} are required for this operation")
      end

      required
    end
def requires(*args)
      missing, required = missing_attributes(args)

      if missing.length == 1
        fail(ArgumentError, "#{missing.keys.first} is required for this operation")
      elsif missing.any?
        fail(ArgumentError, "#{missing.keys[0...-1].join(', ')} and #{missing.keys[-1]} are required for this operation")
      end

      required
    end
Require specification of certain attributes

 @raise [ArgumentError] if any requested attribute does not have a value
 @return [Hash] of matching attributes