Class: Ninsho::Getter
- Inherits:
-
Object
- Object
- Ninsho::Getter
- Defined in:
- lib/ninsho.rb
Overview
It is used toe get the resource class and map it with ActiveSupport to get the class name :user will become User
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.
60 61 62 |
# File 'lib/ninsho.rb', line 60 def initialize name @name = name end |
Instance Method Details
#get ⇒ Object
64 65 66 |
# File 'lib/ninsho.rb', line 64 def get ActiveSupport::Dependencies.constantize(@name) end |