Class: Inform::TagRegistry
Overview
The TagRegistry class
Constant Summary collapse
- SINGLETON =
Struct.new(:memo).new
Instance Method Summary collapse
- #all_persisted_tags ⇒ Object
- #init ⇒ Object (also: #reset)
-
#initialize ⇒ TagRegistry
constructor
A new instance of TagRegistry.
Methods inherited from Set
Constructor Details
#initialize ⇒ TagRegistry
Returns a new instance of TagRegistry.
120 121 122 123 |
# File 'lib/runtime/tag.rb', line 120 def initialize super init end |
Instance Method Details
#all_persisted_tags ⇒ Object
125 126 127 128 129 130 131 |
# File 'lib/runtime/tag.rb', line 125 def return [] unless Inform::Tag.respond_to?(:map) Inform::Tag.map { |a| a.name.to_sym } rescue Sequel::DatabaseError => e log.warn e. return [] end |
#init ⇒ Object Also known as: reset
133 134 135 136 137 138 |
# File 'lib/runtime/tag.rb', line 133 def init self.clear self.merge(Inform::Library::DeclaredAttributes.memo) self.merge() self end |