Sha256: 5246e8ef50ff838047243738183c6b2423371a2291b98dd0a83a406f6bc75314
Contents?: true
Size: 588 Bytes
Versions: 11
Compression:
Stored size: 588 Bytes
Contents
### # XResponse # A standard response class suitable for Ext.Direct AJAX responses. # @author Chris Scott # class XResponse attr_accessor :type, :status, :errors, :success, :message, :result attr_reader :tid def initialize(req) @tid = req.tid @type = req.type @status = false @message = '' @result = [] @errors = [] end def to_h {:tid => @tid, :status => @status, :type => @type, :message => @message, :result => @result, :errors => @errors} end def to_json self.to_h.to_json end end
Version data entries
11 entries across 11 versions & 6 rubygems