Class: Fog::AWS::DataPipeline::Real::JSONObject
- Inherits:
-
Object
- Object
- Fog::AWS::DataPipeline::Real::JSONObject
- Defined in:
- lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb
Instance Method Summary collapse
-
#initialize(object) ⇒ JSONObject
constructor
A new instance of JSONObject.
- #to_api ⇒ Object
Constructor Details
#initialize(object) ⇒ JSONObject
Returns a new instance of JSONObject.
34 35 36 37 38 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 34 def initialize(object) @json_fields = object.clone @id = @json_fields.delete('id') @name = @json_fields.delete('name') || @id end |
Instance Method Details
#to_api ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 40 def to_api { 'id' => @id, 'name' => @name, 'fields' => fields } end |