Sha256: 096b36716c44552a479ffba774e24f5ebb3aa05ab65036553f4ceb7b380cf646
Contents?: true
Size: 612 Bytes
Versions: 14
Compression:
Stored size: 612 Bytes
Contents
module SparkApi module Models class Message < Base self.element_name="messages" def save(arguments={}) begin return save!(arguments) rescue BadResourceRequest => e SparkApi.logger.warn("Failed to save resource #{self}: #{e.message}") rescue NotFound => e SparkApi.logger.error("Failed to save resource #{self}: #{e.message}") end false end def save!(arguments={}) results = connection.post self.class.path, {"Messages" => [ attributes ]}, arguments true end end end end
Version data entries
14 entries across 14 versions & 1 rubygems