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



45
46
47
48
49
50
51
52
# File 'lib/couchbase/model.rb', line 45

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



44
45
46
# File 'lib/couchbase/model.rb', line 44

def record
  @record
end