def set_required_attributes(code, name)
      missing_arguments = []
      missing_arguments << :code if code.nil?
      missing_arguments << :name if name.nil?
      raise ArgumentError.new("Cannot create the Institution based on the given arguments (:code => #{code.inspect}, :name => #{name.inspect}).\n"+
        "The following arguments cannot be nil: #{missing_arguments.inspect}") unless missing_arguments.empty?
      # Set the instance variables
      @code, @name = code.to_sym, name
    end
def set_required_attributes(code, name)
      missing_arguments = []
      missing_arguments << :code if code.nil?
      missing_arguments << :name if name.nil?
      raise ArgumentError.new("Cannot create the Institution based on the given arguments (:code => #{code.inspect}, :name => #{name.inspect}).\n"+
        "The following arguments cannot be nil: #{missing_arguments.inspect}") unless missing_arguments.empty?
      # Set the instance variables
      @code, @name = code.to_sym, name
    end
Creates a new Institution object from the given code, name and hash.

 The optional +hash+, if given, will generate additional attributes and values.


 For example:

   require 'institutions'
   hash = { "attribute1" => "My first attribute.", :array_attribute => [1, 2] }
   institution = Institutions::Institution.new("my_inst", "My Institution", hash)

   p institution        # -> <Institutions::Institution @code=:my_inst @name="My Institution" @attribute1=My first attribute." @array_attribute=[1, 2] @default=false>


 Sets the required attributes.
 Raises an ArgumentError specifying the missing arguments if they are nil.