Method: Cosmos::Model.get_model
- Defined in:
- lib/cosmos/models/model.rb
.get_model(name:, scope:) ⇒ Object|nil
Calls self.get and then from_json to turn the Hash configuration into a Ruby Model object.
93 94 95 96 97 98 99 100 |
# File 'lib/cosmos/models/model.rb', line 93 def self.get_model(name:, scope:) json = get(name: name, scope: scope) if json return from_json(json, scope: scope) else return nil end end |