class OpenGraphReader::Object::Registry
Global registry of namespaces and their representing classes. Also tracks which verticals are defined.
@api private
Attributes
Public Class Methods
Source
# File lib/open_graph_reader/object/registry.rb, line 51 def initialize @namespaces = {} @verticals = Set.new end
Public Instance Methods
Source
# File lib/open_graph_reader/object/registry.rb, line 57 def [] namespace raise UnknownNamespaceError, "#{namespace} is not a registered namespace" unless registered? namespace @namespaces[namespace] end
@see Registry.[]