Class: Devise::Getter
- Inherits:
-
Object
- Object
- Devise::Getter
- Defined in:
- lib/devise.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(name) ⇒ Getter
constructor
A new instance of Getter.
Constructor Details
#initialize(name) ⇒ Getter
Returns a new instance of Getter.
317 318 319 |
# File 'lib/devise.rb', line 317 def initialize(name) @name = name end |
Instance Method Details
#get ⇒ Object
321 322 323 324 325 326 327 328 |
# File 'lib/devise.rb', line 321 def get # TODO: Remove AS::Dependencies usage when dropping support to Rails < 7. if ActiveSupport::Dependencies.respond_to?(:constantize) ActiveSupport::Dependencies.constantize(@name) else @name.constantize end end |