lib/ocean/api_remote_resource.rb
#
# Instance method to do a PUT to a resource or any of its hyperlinks. Will raise exceptions
# if they occur, otherwise will return the resource itself.
#
Instance method to do a PUT to a resource or any of its hyperlinks. Will raise exceptions
if they occur, otherwise will return the resource itself.
Instance method to do a PUT to a resource or any of its hyperlinks . Will raise exceptions if they occur otherwise will return the resource itself .
def put!(hlink=nil, args: nil, body: {})
      get!
      hlink = hlink.to_s if hlink
      if !args && (!hlink || hlink == 'self')
        _modify(body)
        self
      else
        hl_data = hyperlink[hlink]
        raise HyperlinkMissing, "#{resource_type} has no #{hlink} hyperlink" unless hl_data
        hl_res = RemoteResource.new(hl_data['href'], retries: retries, backoff_time: backoff_time, 
                                                     backoff_rate: backoff_rate, backoff_max: backoff_max)
        hl_res.send :_modify, body, args: args
        hl_res
      end
    end
def put! ( hlink = nil , args : nil , body : { } ) get! hlink = hlink . to_s if hlink if ! args && ( ! hlink || hlink == 'self' ) _modify ( body ) self else hl_data = hyperlink [ hlink ] raise HyperlinkMissing , "#{resource_type} has no #{hlink} hyperlink" unless hl_data hl_res = RemoteResource . new ( hl_data [ 'href' ] , retries : retries , backoff_time : backoff_time , backoff_rate : backoff_rate , backoff_max : backoff_max ) hl_res . send :_modify , body , args : args hl_res end end
Instance method to do a PUT to a resource or any of its hyperlinks.
Instance method to do a PUT to a resource or any of its hyperlinks .
hlink
args
body