Class: MsRestAzure2::Serialization::Serialization
- Inherits:
-
MsRest2::Serialization::Serialization
- Object
- MsRest2::Serialization::Serialization
- MsRestAzure2::Serialization::Serialization
- Defined in:
- lib/ms_rest_azure2/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_azure2/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 MsRestAzure2 namespace if model name not found in the ARM's models namespace Object.const_get("MsRestAzure2::#{model_name}") end end |