Class: CouchbaseOrm::Configuration::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase-orm/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIndex

Returns a new instance of Index.



8
9
10
11
12
13
# File 'lib/couchbase-orm/configuration.rb', line 8

def initialize
  @bucket = nil
  @num_replica = 0
  @migrations_path = 'db/indexes'
  @schema_path = 'db/index_schema.rb'
end

Instance Attribute Details

#bucketObject

Returns the value of attribute bucket.



6
7
8
# File 'lib/couchbase-orm/configuration.rb', line 6

def bucket
  @bucket
end

#migrations_pathObject

Returns the value of attribute migrations_path.



6
7
8
# File 'lib/couchbase-orm/configuration.rb', line 6

def migrations_path
  @migrations_path
end

#num_replicaObject

Returns the value of attribute num_replica.



6
7
8
# File 'lib/couchbase-orm/configuration.rb', line 6

def num_replica
  @num_replica
end

#schema_pathObject

Returns the value of attribute schema_path.



6
7
8
# File 'lib/couchbase-orm/configuration.rb', line 6

def schema_path
  @schema_path
end

Instance Method Details

#effective_bucketObject



15
16
17
# File 'lib/couchbase-orm/configuration.rb', line 15

def effective_bucket
  bucket || CouchbaseOrm::Connection.config[:bucket]
end