Class: Error::RecordInvalid

Inherits:
Base
  • Object
show all
Defined in:
lib/couchbase/model.rb

Overview

Since:

  • 0.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalid

Returns a new instance of RecordInvalid.

Since:

  • 0.4.0



52
53
54
55
56
57
58
59
# File 'lib/couchbase/model.rb', line 52

def initialize(record)
  @record = record
  if @record.errors
    super(@record.errors.full_messages.join(', '))
  else
    super('Record invalid')
  end
end

Instance Attribute Details

#recordObject (readonly)

Since:

  • 0.4.0



51
52
53
# File 'lib/couchbase/model.rb', line 51

def record
  @record
end