Sha256: 2700c6026bed8846e180b1280b890514cb0121c9f6e13820c162e08616f75c93

Contents?: true

Size: 513 Bytes

Versions: 11

Compression:

Stored size: 513 Bytes

Contents

module SparkApi
  module Models
    class Message < Base
      self.element_name="messages"
      
      def save(arguments={})
        begin
          return save!(arguments)
        rescue NotFound, BadResourceRequest => 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

11 entries across 11 versions & 1 rubygems

Version Path
spark_api-1.3.1 lib/spark_api/models/message.rb
spark_api-1.3.0 lib/spark_api/models/message.rb
spark_api-1.2.1 lib/spark_api/models/message.rb
spark_api-1.2.0 lib/spark_api/models/message.rb
spark_api-1.1.2 lib/spark_api/models/message.rb
spark_api-1.1.1 lib/spark_api/models/message.rb
spark_api-1.1.0 lib/spark_api/models/message.rb
spark_api-1.0.4 lib/spark_api/models/message.rb
spark_api-1.0.2 lib/spark_api/models/message.rb
spark_api-1.0.1 lib/spark_api/models/message.rb
spark_api-1.0.0 lib/spark_api/models/message.rb