Class: Lutaml::Rdf::Mapping
- Inherits:
-
Object
- Object
- Lutaml::Rdf::Mapping
- Defined in:
- lib/glossarist/rdf/ext/mapping_ext.rb
Instance Attribute Summary collapse
-
#namespace_set ⇒ Object
writeonly
Sets the attribute namespace_set.
-
#rdf_members ⇒ Object
writeonly
Sets the attribute rdf_members.
-
#rdf_predicates ⇒ Object
writeonly
Sets the attribute rdf_predicates.
-
#rdf_subject ⇒ Object
writeonly
Sets the attribute rdf_subject.
-
#rdf_type ⇒ Object
writeonly
Sets the attribute rdf_type.
Instance Method Summary collapse
- #has_types_or_predicates? ⇒ Boolean
- #rdf_types ⇒ Object
- #rdf_types=(values) ⇒ Object
- #types(*values) ⇒ Object
Instance Attribute Details
#namespace_set=(value) ⇒ Object (writeonly)
Sets the attribute namespace_set
11 12 13 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 11 def namespace_set=(value) @namespace_set = value end |
#rdf_members=(value) ⇒ Object (writeonly)
Sets the attribute rdf_members
11 12 13 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 11 def rdf_members=(value) @rdf_members = value end |
#rdf_predicates=(value) ⇒ Object (writeonly)
Sets the attribute rdf_predicates
11 12 13 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 11 def rdf_predicates=(value) @rdf_predicates = value end |
#rdf_subject=(value) ⇒ Object (writeonly)
Sets the attribute rdf_subject
11 12 13 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 11 def rdf_subject=(value) @rdf_subject = value end |
#rdf_type=(value) ⇒ Object (writeonly)
Sets the attribute rdf_type
11 12 13 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 11 def rdf_type=(value) @rdf_type = value end |
Instance Method Details
#has_types_or_predicates? ⇒ Boolean
32 33 34 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 32 def has_types_or_predicates? rdf_types.any? || rdf_predicates.any? end |
#rdf_types ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 18 def rdf_types if defined?(@rdf_types) && @rdf_types @rdf_types elsif @rdf_type [@rdf_type.to_s] else [] end end |
#rdf_types=(values) ⇒ Object
28 29 30 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 28 def rdf_types=(values) @rdf_types = values end |
#types(*values) ⇒ Object
14 15 16 |
# File 'lib/glossarist/rdf/ext/mapping_ext.rb', line 14 def types(*values) @rdf_types = values.flatten.map(&:to_s) end |