Class: MsRestAzure::Serialization::Serialization
- Inherits:
-
MsRest::Serialization::Serialization
- Object
- MsRest::Serialization::Serialization
- MsRestAzure::Serialization::Serialization
- Defined in:
- lib/ms_rest_azure/serialization.rb
Overview
Class to handle serialization & deserialization.
Instance Method Summary collapse
-
#get_model(model_name) ⇒ Object
Retrieves model of the model_name.
Instance Method Details
#get_model(model_name) ⇒ Object
Retrieves model of the model_name
32 33 34 35 36 37 38 39 |
# File 'lib/ms_rest_azure/serialization.rb', line 32 def get_model(model_name) begin Object.const_get(@context.class.to_s.split('::')[0...-1].join('::') + "::Models::#{model_name}") rescue NameError # Look into MsRestAzure namespace if model name not found in the ARM's models namespace Object.const_get("MsRestAzure::#{model_name}") end end |