Class: HornOfPlenty::Repositories::Issue
- Inherits:
-
Object
- Object
- HornOfPlenty::Repositories::Issue
- Defined in:
- lib/horn_of_plenty/repositories/issue.rb
Class Method Summary collapse
Class Method Details
.adapter_class_for(adapter) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/horn_of_plenty/repositories/issue.rb', line 13 def self.adapter_class_for(adapter) adapter_class_name = "HornOfPlenty::" \ "Adapters::" \ "#{HornOfPlenty::CoreExt::String.camelize(adapter)}::" \ "Repositories::" \ "Issue" require HornOfPlenty::CoreExt::String.underscore(adapter_class_name) HornOfPlenty::CoreExt::String.constantize(adapter_class_name) end |
.fetch(**attrs) ⇒ Object
7 8 9 10 11 |
# File 'lib/horn_of_plenty/repositories/issue.rb', line 7 def self.fetch(**attrs) adapter = attrs.delete(:adapter) adapter_class_for(adapter).fetch(**attrs) end |