lib/azure/armrest/armrest_collection.rb
# Creates and returns a ArmrestCollection object based on JSON input,
# using +klass+ to generate the list elements. In addition, both the
# response headers and continuation token are set.
#
Creates and returns a ArmrestCollection object based on JSON input,
using +klass+ to generate the list elements. In addition, both the
response headers and continuation token are set.
Creates and returns a ArmrestCollection object based on JSON input using + klass + to generate the list elements . In addition both the response headers and continuation token are set .
def create_from_response(response, klass = nil, skip_accessors_definition = false)
          json_response = JSON.parse(response)
          array = new(json_response['value'].map { |hash| klass.new(hash, skip_accessors_definition) })
          array.response_code = response.code
          array.response_headers = response.headers
          array.next_link = json_response['nextLink']
          array.continuation_token = parse_skip_token(array.next_link)
          array
        end
def create_from_response ( response , klass = nil , skip_accessors_definition = false ) json_response = JSON . parse ( response ) array = new ( json_response [ 'value' ] . map { | hash | klass . new ( hash , skip_accessors_definition ) } ) array . response_code = response . code array . response_headers = response . headers array . next_link = json_response [ 'nextLink' ] array . continuation_token = parse_skip_token ( array . next_link ) array end
Creates and returns a ArmrestCollection object based on JSON input,
using +klass+ to generate the list elements.
Creates and returns a ArmrestCollection object based on JSON input using + klass + to generate the list elements .
response
<not_specific>
klass
<not_specific>
skip_accessors_definition
<not_specific>