Class: Error::RecordInvalid

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

Overview

Since:

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (RecordInvalid) initialize(record)

Returns a new instance of RecordInvalid

Since:

  • 0.4.0



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

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

Instance Attribute Details

- (Object) record (readonly)

Since:

  • 0.4.0



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

def record
  @record
end