Sha256: 2e7855a77a7aca434b0c1119e744a9f2f05641763e4277f80e6c5e8e70067c90
Contents?: true
Size: 696 Bytes
Versions: 6
Compression:
Stored size: 696 Bytes
Contents
# Class CreateResponse represents server response on +create+ Posting API # request. Server response is sent to +from_array+ method which creates objects # with attributes +postKey+, +error+ accessible via getters: # # response = RangeResponse.from_array(...) # response.postKey # => String # response.post_key # => String # response.error # => String # class CreateResponse < Struct.new(:postKey, :error) do def post_key postKey end end # Method +from_array+ creates an array of CreateResponse objects from a given # array of JSON hashes. def self.from_array(array) array.collect do |element| CreateResponse.from_hash(element) end end end
Version data entries
6 entries across 6 versions & 1 rubygems