app/services/hyrax/laevigata_authority_service.rb
##
# Builds an authority service for a given school or department.
#
# Given a school, a deparmental authority service is returned with the
# appropriate deparments within that school. Given a department, a
# subfield authority service is returned representing the subfields
# within the department.
#
# If both are given, an argument error is raised.
#
# @overload for(school:)
#   @param [#=~] school
#   @return [LaevigataAuthorityService] a departmental authority service
# @overload for(departement:)
#   @param [#=~] department
#   @return [LaevigataAuthorityService] a subfield authority service
#
# @raise [ArgumentError] when both a school and department are given.
Builds an authority service for a given school or department.
Given a school, a deparmental authority service is returned with the
appropriate deparments within that school. Given a department, a
subfield authority service is returned representing the subfields
within the department.

If both are given, an argument error is raised.
Builds an authority service for a given school or department . Given a school a deparmental authority service is returned with the appropriate deparments within that school . Given a department a subfield authority service is returned representing the subfields within the department . If both are given an argument error is raised .
def for(school: nil, department: nil)
        return for_school(school)         if school     && !department
        return for_department(department) if department && !school
        raise(ArgumentError,
              "Expected one of school or department. Got school: #{school}; department: #{department}")
      end
def for ( school : nil , department : nil ) return for_school ( school ) if school && ! department return for_department ( department ) if department && ! school raise ( ArgumentError , "Expected one of school or department. Got school: #{school}; department: #{department}" ) end
Builds an authority service for a given school or department.
Builds an authority service for a given school or department .
[ArgumentError] when both a school and department are given.
[ ArgumentError ] when both a school and department are given .
school
<not_specific>
department
<not_specific>
overload
) @param [#=~] school @return [LaevigataAuthorityService] a departmental authority service
) @param [ # = ~ ] school @return [ LaevigataAuthorityService ] a departmental authority service
overload
) @param [#=~] department @return [LaevigataAuthorityService] a subfield authority service
) @param [ # = ~ ] department @return [ LaevigataAuthorityService ] a subfield authority service