Exception: Contracts::SnapshotError

Inherits:
Error
  • Object
show all
Defined in:
lib/contracts.rb

Direct Known Subclasses

StateObservationError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

#initialize(message = nil, strategy: nil, field: nil, receiver_class: nil, original_exception: nil) ⇒ SnapshotError

Returns a new instance of SnapshotError.



44
45
46
47
48
49
50
# File 'lib/contracts.rb', line 44

def initialize(message = nil, strategy: nil, field: nil, receiver_class: nil, original_exception: nil)
  @strategy = strategy
  @field = field
  @receiver_class = receiver_class
  @original_exception = original_exception
  super(message)
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



42
43
44
# File 'lib/contracts.rb', line 42

def field
  @field
end

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



42
43
44
# File 'lib/contracts.rb', line 42

def original_exception
  @original_exception
end

#receiver_classObject (readonly)

Returns the value of attribute receiver_class.



42
43
44
# File 'lib/contracts.rb', line 42

def receiver_class
  @receiver_class
end

#strategyObject (readonly)

Returns the value of attribute strategy.



42
43
44
# File 'lib/contracts.rb', line 42

def strategy
  @strategy
end