Class: Paquito::SafeYAML::RestrictedYAMLTree::DispatchCache
- Inherits:
-
Object
- Object
- Paquito::SafeYAML::RestrictedYAMLTree::DispatchCache
- Defined in:
- lib/paquito/safe_yaml.rb
Instance Method Summary collapse
- #[](klass) ⇒ Object
-
#initialize(visitor, cache) ⇒ DispatchCache
constructor
A new instance of DispatchCache.
Constructor Details
#initialize(visitor, cache) ⇒ DispatchCache
Returns a new instance of DispatchCache.
55 56 57 58 |
# File 'lib/paquito/safe_yaml.rb', line 55 def initialize(visitor, cache) @visitor = visitor @cache = cache end |
Instance Method Details
#[](klass) ⇒ Object
60 61 62 |
# File 'lib/paquito/safe_yaml.rb', line 60 def [](klass) @cache[klass] if @visitor.permitted_class?(klass) end |