Class: Specjour::MarshalableException

Inherits:
Object
  • Object
show all
Defined in:
lib/specjour/rspec/marshalable_rspec_failure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ MarshalableException

Returns a new instance of MarshalableException.



25
26
27
28
29
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 25

def initialize(exception)
  self.class_name = exception.class.name
  self.message = exception.message
  self.backtrace = exception.backtrace
end

Instance Attribute Details

#backtraceObject

Returns the value of attribute backtrace.



23
24
25
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 23

def backtrace
  @backtrace
end

#class_nameObject

Returns the value of attribute class_name.



23
24
25
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 23

def class_name
  @class_name
end

#messageObject

Returns the value of attribute message.



23
24
25
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 23

def message
  @message
end

Instance Method Details

#classObject



31
32
33
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 31

def class
  @class ||= OpenStruct.new :name => class_name
end