Module: FRBR::Group1
- Included in:
- Expression, Item, Manifestation, Work
- Defined in:
- lib/frbr/groups.rb
Instance Attribute Summary collapse
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
3 4 5 |
# File 'lib/frbr/groups.rb', line 3 def relationships @relationships end |
Class Method Details
.check_frbr_validity(o, mod_name) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/frbr/groups.rb', line 4 def self.check_frbr_validity(o, mod_name) raise TypeError, "Group 1 entities cannot also be Group 2 entities" if o.is_a?(FRBR::Group2) unless mod_name == "FRBR::Group1" entities = [FRBR::Work, FRBR::Expression, FRBR::Manifestation, FRBR::Item, FRBR::Concept, FRBR::Event, FRBR::Object, FRBR::Place] entities.delete(Kernel.constant(mod_name)) entities.each do |e| raise TypeError, "#{mod_name} cannot also be a #{e.to_s}" if o.is_a?(e) end end [FRBR::Concept, FRBR::Event, FRBR::Object, FRBR::Place].each do |subject| raise TypeError, "#{subject} cannot be a Group 1 entity" if o.is_a?(subject) end end |
Instance Method Details
#related ⇒ Object
18 19 20 |
# File 'lib/frbr/groups.rb', line 18 def return @relationships[this_method.to_sym] end |