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.
36 37 38 39 40 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 36 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
42 43 44 45 46 47 48 |
# File 'lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb', line 42 def to_api { 'id' => @id, 'name' => @name, 'fields' => fields } end |