Class: Negroni::Resolver Private

Inherits:
Object
  • Object
show all
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

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

#resolveObject

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