Class: Fog::AWS::DataPipeline::Shared::JSONObject
- Inherits:
-
Object
- Object
- Fog::AWS::DataPipeline::Shared::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.
6 7 8 9 10 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 6 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
12 13 14 15 16 17 18 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 12 def to_api { 'id' => @id, 'name' => @name, 'fields' => fields } end |