Class: Fog::AWS::DataPipeline::Real::JSONObject

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb

Instance Method Summary collapse

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_apiObject



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