Class: Ant::Server::Nanoservice::Datasource::IDGenerators
- Inherits:
-
Object
- Object
- Ant::Server::Nanoservice::Datasource::IDGenerators
show all
- Extended by:
- DRY::ResourceInjector
- Defined in:
- lib/ant/server/nanoservice/datasource/id_generators.rb
Class Method Summary
collapse
register, resource, resources
Class Method Details
.[](key) ⇒ Object
7
8
9
|
# File 'lib/ant/server/nanoservice/datasource/id_generators.rb', line 7
def self.[](key)
resource(:generators, key)
end
|
.normalize_id(object, key) ⇒ Object
11
12
13
|
# File 'lib/ant/server/nanoservice/datasource/id_generators.rb', line 11
def self.normalize_id(object, key)
object.is_a?(Hash) ? object[key] : object
end
|