Class: LD4L::OpenAnnotationRDF::Configuration
- Inherits:
-
Object
- Object
- LD4L::OpenAnnotationRDF::Configuration
- Defined in:
- lib/ld4l/open_annotation_rdf/configuration.rb
Overview
Use LD4L::OpenAnnotationRDF.configure to call the methods in this class. See ‘Configure all configurable properties’ example for most common approach to configuration.
Used by LD4L::OpenAnnotationRDF class to configure…
-
base_uri
-
local_minter
-
unique_tags
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#reset_base_uri ⇒ Object
Reset the base_uri to be used when generating rdf_subject for new objects back to the default configuration.
-
#reset_localname_minter ⇒ Object
Reset the minter to be used to generate the local name portion of the rdf_subject for new objects to the default minter.
-
#reset_unique_tags ⇒ Object
Reset whether the GEM should enforce uniqueness of user generated tags, when using the TagAnnotation::setTag method, to the default configuration (true).
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
84 85 86 87 88 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 84 def initialize @base_uri = self.class.send(:default_base_uri) @localname_minter = self.class.send(:default_localname_minter) @unique_tags = self.class.send(:default_unique_tags) end |
Instance Attribute Details
#base_uri ⇒ Object #base_uri=(new_base_uri) ⇒ Object
37 38 39 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 37 def base_uri @base_uri end |
#localname_minter ⇒ Object #localname_minter=(new_localname_minter) ⇒ Object
46 47 48 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 46 def localname_minter @localname_minter end |
#unique_tags ⇒ Object #unique_tags=(new_unique_tags) ⇒ Object
66 67 68 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 66 def @unique_tags end |
Instance Method Details
#reset_base_uri ⇒ Object
Reset the base_uri to be used when generating rdf_subject for new objects back to the default configuration.
97 98 99 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 97 def reset_base_uri @base_uri = self.class.send(:default_base_uri) end |
#reset_localname_minter ⇒ Object
Reset the minter to be used to generate the local name portion of the rdf_subject for new objects to the default minter.
109 110 111 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 109 def reset_localname_minter @localname_minter = self.class.send(:default_localname_minter) end |
#reset_unique_tags ⇒ Object
Reset whether the GEM should enforce uniqueness of user generated tags, when using the TagAnnotation::setTag method, to the default configuration (true).
122 123 124 |
# File 'lib/ld4l/open_annotation_rdf/configuration.rb', line 122 def @unique_tags = self.class.send(:default_unique_tags) end |