@@ -11,20 +11,18 @@ class Description
1111
1212 # @param [Nokogiri::XML] mods
1313 # @param [String] druid
14- # @oaram [String] label
1514 # @param [TitleBuilder] title_builder - defaults to Title class
1615 # @param [Cocina::Models::Mapping::ErrorNotifier] notifier
1716 # @return [Hash] a hash that can be mapped to a cocina descriptive model
18- def self . props ( mods :, druid :, label : , title_builder : Title , notifier : nil )
19- new ( title_builder : title_builder , mods : mods , druid : druid , label : label , notifier : notifier ) . props
17+ def self . props ( mods :, druid :, title_builder : Title , notifier : nil )
18+ new ( title_builder : title_builder , mods : mods , druid : druid , notifier : notifier ) . props
2019 end
2120
22- def initialize ( title_builder :, mods :, label : , druid :, notifier :)
21+ def initialize ( title_builder :, mods :, druid :, notifier :)
2322 @title_builder = title_builder
2423 @ng_xml = mods
2524 @notifier = notifier || ErrorNotifier . new ( druid : druid )
2625 @druid = druid
27- @label = label
2826 end
2927
3028 # @return [Hash] a hash that can be mapped to a cocina descriptive model
@@ -34,17 +32,15 @@ def props
3432
3533 check_altrepgroups
3634 check_version
37- props = DescriptionBuilder . build ( title_builder : title_builder ,
38- resource_element : ng_xml . root ,
39- notifier : notifier ,
40- purl : druid ? Cocina ::Models ::Mapping ::Purl . for ( druid : druid ) : nil )
41- props [ :title ] = [ { value : label } ] unless props . key? ( :title )
42- props
35+ DescriptionBuilder . build ( title_builder : title_builder ,
36+ resource_element : ng_xml . root ,
37+ notifier : notifier ,
38+ purl : druid ? Cocina ::Models ::Mapping ::Purl . for ( druid : druid ) : nil )
4339 end
4440
4541 private
4642
47- attr_reader :title_builder , :ng_xml , :notifier , :druid , :label
43+ attr_reader :title_builder , :ng_xml , :notifier , :druid
4844
4945 def check_altrepgroups
5046 ng_xml . xpath ( '//mods:*[@altRepGroup]' , mods : DESC_METADATA_NS )
0 commit comments