Exception: PlanMyStuff::StaleObjectError

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

Overview

Raised when an object has been modified remotely since it was loaded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, local_updated_at: nil, remote_updated_at: nil) ⇒ StaleObjectError

Returns a new instance of StaleObjectError.

Parameters:

  • message (String) (defaults to: nil)
  • local_updated_at (Time, nil) (defaults to: nil)
  • remote_updated_at (Time, nil) (defaults to: nil)


62
63
64
65
66
# File 'lib/plan_my_stuff/errors.rb', line 62

def initialize(message = nil, local_updated_at: nil, remote_updated_at: nil)
  @local_updated_at = local_updated_at
  @remote_updated_at = remote_updated_at
  super(message)
end

Instance Attribute Details

#local_updated_atTime? (readonly)

Returns:

  • (Time, nil)


53
54
55
# File 'lib/plan_my_stuff/errors.rb', line 53

def local_updated_at
  @local_updated_at
end

#remote_updated_atTime? (readonly)

Returns:

  • (Time, nil)


56
57
58
# File 'lib/plan_my_stuff/errors.rb', line 56

def remote_updated_at
  @remote_updated_at
end