Class: Negroni::Resolver Private
- Inherits:
-
Object
- Object
- Negroni::Resolver
- Defined in:
- lib/negroni/resolver.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Resolver is responsible for getting and ‘constantizing` a string.
Instance Method Summary collapse
-
#initialize(reference) ⇒ Resolver
constructor
private
Create a Resolver.
-
#resolve ⇒ Object
private
Resolve a string to a constant.
Constructor Details
#initialize(reference) ⇒ Resolver
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a Resolver
8 9 10 |
# File 'lib/negroni/resolver.rb', line 8 def initialize(reference) @reference = reference end |
Instance Method Details
#resolve ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Resolve a string to a constant
13 14 15 |
# File 'lib/negroni/resolver.rb', line 13 def resolve ActiveSupport::Dependencies.constantize(@reference) end |