Class: BerkeleyLibrary::TIND::Mapping::MultipleRule

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/berkeley_library/tind/mapping/multiple_rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

alma_datafield, collection_config_correct?, concatenation_symbol, csv_rows, datafield, from_xml, indicator, order_subfields, qualified_alma_record?, remove_extra_symbol, subfield, subfield_hash, symbols, tag_symbol

Methods included from AlmaBase

#base_save, #base_tind_record

Constructor Details

#initialize(row) ⇒ MultipleRule

Returns a new instance of MultipleRule.



15
16
17
18
19
20
21
22
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 15

def initialize(row)
  @tag_origin = row[:tag_origin]
  @tag_destination = row[:tag_destination]
  @indicator = Util.indicator(row[:new_indecator])
  @pre_existed_tag = row[:map_if_no_this_tag_existed]
  @subfield_key = row[:subfield_key]
  @position_from_to = extract_position(row[:value_from], row[:value_to])
end

Instance Attribute Details

#indicatorObject (readonly)

Returns the value of attribute indicator.



10
11
12
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 10

def indicator
  @indicator
end

#position_from_toObject (readonly)

Returns the value of attribute position_from_to.



13
14
15
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 13

def position_from_to
  @position_from_to
end

#pre_existed_tagObject (readonly)

Returns the value of attribute pre_existed_tag.



11
12
13
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 11

def pre_existed_tag
  @pre_existed_tag
end

#subfield_keyObject (readonly)

Returns the value of attribute subfield_key.



12
13
14
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 12

def subfield_key
  @subfield_key
end

#tag_destinationObject (readonly)

Returns the value of attribute tag_destination.



9
10
11
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 9

def tag_destination
  @tag_destination
end

#tag_originObject (readonly)

Returns the value of attribute tag_origin.



8
9
10
# File 'lib/berkeley_library/tind/mapping/multiple_rule.rb', line 8

def tag_origin
  @tag_origin
end