Class: ONIX::ONIX21::SalesRights

Inherits:
SubsetDSL show all
Defined in:
lib/onix/onix21.rb

Instance Attribute Summary

Attributes included from Attributes

#attributes

Low level collapse

Instance Method Summary collapse

Methods inherited from SubsetDSL

#get_class, ref_to_short, short_to_ref

Methods inherited from SubsetDSL

element, elements, #get_class, get_class, inherited, #initialize, n, #parse, ref_to_short, register_elements, register_scopes, #register_subset_array, registered_elements, #registered_elements, registered_scopes, scope, short_to_ref

Methods inherited from Subset

parse, #parse, #tag_match, #unsupported

Methods included from Attributes

attribute_class, #parse_attributes, #serialized_attributes

Constructor Details

This class inherits a constructor from ONIX::SubsetDSL

Instance Method Details

#not_for_sale?Boolean

Returns:

  • (Boolean)


219
220
221
# File 'lib/onix/onix21.rb', line 219

def not_for_sale?
  ["03", "04", "05", "06"].include?(@sales_rights_type)
end

#rights_countryString

Returns:

  • (String)


217
# File 'lib/onix/onix21.rb', line 217

element "RightsCountry", :text

#sales_rights_typeString

Returns:

  • (String)


216
# File 'lib/onix/onix21.rb', line 216

element "SalesRightsType", :text

#territoryObject



223
224
225
# File 'lib/onix/onix21.rb', line 223

def territory
  Territory.new(@rights_country.split(" "))
end