Exception: CouchDB::PropertyError

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

Direct Known Subclasses

InvalidValue, MissingProperty, UndefinedProperty

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, msg = nil) ⇒ PropertyError

Returns a new instance of PropertyError.



9
10
11
12
13
# File 'lib/couchdb/errors.rb', line 9

def initialize(name, msg = nil)
  @name = name
  msg ||= "Property error: #{name}"
  super msg
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/couchdb/errors.rb', line 7

def name
  @name
end

Instance Method Details

#to_hashObject



15
16
17
# File 'lib/couchdb/errors.rb', line 15

def to_hash
  {:property => name, :error => 'error'}
end