class Comet::StoredObject
def to_hash
-
(Hash)
- The complete object as a Ruby hash
def to_hash ret = {} ret['name'] = @name ret['mtime'] = @modify_time ret['type'] = @type ret['subtree'] = @subtree ret['size'] = @size unless @display_name.nil? ret['dname'] = @display_name end unless @item_class.nil? ret['itemClass'] = @item_class end unless @from.nil? ret['from'] = @from end unless @to.nil? ret['to'] = @to end unless @received_date_time.nil? ret['rtime'] = @received_date_time end unless @has_attachments.nil? ret['has_attachments'] = @has_attachments end unless @start_time.nil? ret['stime'] = @start_time end unless @end_time.nil? ret['etime'] = @end_time end unless @recursive_count_known.nil? ret['r'] = @recursive_count_known end unless @recursive_files.nil? ret['f'] = @recursive_files end unless @recursive_bytes.nil? ret['b'] = @recursive_bytes end unless @recursive_folders.nil? ret['d'] = @recursive_folders end @unknown_json_fields.each do |k, v| ret[k] = v end ret end