Class: Soulmate::Base

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/soulmate/base.rb

Direct Known Subclasses

Loader, Matcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#normalize, #prefixes_for_phrase

Constructor Details

#initialize(type) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/soulmate/base.rb', line 9

def initialize(type)
  @type = normalize(type)
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/soulmate/base.rb', line 7

def type
  @type
end

Instance Method Details

#baseObject



13
14
15
# File 'lib/soulmate/base.rb', line 13

def base
  "soulmate-index:#{type}"
end

#cachebaseObject



21
22
23
# File 'lib/soulmate/base.rb', line 21

def cachebase
  "soulmate-cache:#{type}"
end

#databaseObject



17
18
19
# File 'lib/soulmate/base.rb', line 17

def database
  "soulmate-data:#{type}"
end