Class: Rave::Models::Event::OperationError

Inherits:
Rave::Models::Event show all
Defined in:
lib/models/event.rb

Constant Summary

Constants inherited from Rave::Models::Event

BLIP_ID

Constants included from Rave::Mixins::ObjectFactory

Rave::Mixins::ObjectFactory::WILDCARD

Instance Attribute Summary

Attributes included from Rave::Mixins::ObjectFactory

#type

Instance Method Summary collapse

Methods inherited from Rave::Models::Event

#blip, #blip_id, #initialize, #modified_by, #timestamp, #wavelet

Methods included from Rave::Mixins::ObjectFactory

included

Methods included from Rave::Mixins::TimeUtils

#time_from_json

Constructor Details

This class inherits a constructor from Rave::Models::Event

Instance Method Details

#messageObject

Message describing what caused the error [String]



210
211
212
# File 'lib/models/event.rb', line 210

def message # :nodoc:
  @properties['errorMessage'].dup
end

#operation_timestampObject

Time of the err [String]



222
223
224
225
226
# File 'lib/models/event.rb', line 222

def operation_timestamp # :nodoc:
  # Format is "document.appendMarkup1260632282946" (number is timestamp)
  @properties['operationId'] =~ /(\d+)$/
  time_from_json($1)
end

#operation_typeObject

Operation type that caused the error [String]



215
216
217
218
219
# File 'lib/models/event.rb', line 215

def operation_type # :nodoc:
  # Format is "document.appendMarkup1260632282946" (number is timestamp)
  @properties['operationId'] =~ /^(.+?)\d+$/
  "#{$1.split(/(?=[A-Z])|\./).join('_').upcase}"
end