Class: ONIX::TitleDetail
- Defined in:
- lib/onix/title_detail.rb
Instance Attribute Summary
Attributes included from Attributes
Low level collapse
Shortcuts collapse
-
#type ⇒ TitleType
shortcut for #title_type.
Instance Method Summary collapse
-
#title ⇒ String
:category: High level flatten title string.
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
#title ⇒ String
:category: High level flatten title string
14 15 16 17 18 19 20 21 |
# File 'lib/onix/title_detail.rb', line 14 def title return title_statement if title_statement title_element = @title_elements.product_level #select { |te| te.level.human=~/Product/ } if title_element.size > 0 title_element.first.title end end |
#title_elements ⇒ Array<TitleElement>
6 |
# File 'lib/onix/title_detail.rb', line 6 elements "TitleElement", :subset, :cardinality => 1..n |
#title_statement ⇒ String
7 |
# File 'lib/onix/title_detail.rb', line 7 element "TitleStatement", :text, :cardinality => 0..1 |
#title_type ⇒ TitleType
5 |
# File 'lib/onix/title_detail.rb', line 5 element "TitleType", :subset, :shortcut => :type, :cardinality => 1 |
#type ⇒ TitleType
shortcut for #title_type
5 |
# File 'lib/onix/title_detail.rb', line 5 element "TitleType", :subset, :shortcut => :type, :cardinality => 1 |