Class: Lunar::FuzzySets

Inherits:
Array
  • Object
show all
Defined in:
lib/lunar/sets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix, keywords, field) ⇒ FuzzySets

Returns a new instance of FuzzySets.



20
21
22
23
24
25
26
# File 'lib/lunar/sets.rb', line 20

def initialize(prefix, keywords, field)
  @prefix = prefix
  @field  = field
  @words = Words.new(keywords)

  super(redis_set_keys)
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



18
19
20
# File 'lib/lunar/sets.rb', line 18

def field
  @field
end

#prefixObject (readonly)

Returns the value of attribute prefix.



18
19
20
# File 'lib/lunar/sets.rb', line 18

def prefix
  @prefix
end

#wordsObject (readonly)

Returns the value of attribute words.



18
19
20
# File 'lib/lunar/sets.rb', line 18

def words
  @words
end