Class: Lunar::KeywordSets

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 = '*') ⇒ KeywordSets

Returns a new instance of KeywordSets.



65
66
67
68
69
70
71
# File 'lib/lunar/sets.rb', line 65

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.



63
64
65
# File 'lib/lunar/sets.rb', line 63

def field
  @field
end

#prefixObject (readonly)

Returns the value of attribute prefix.



63
64
65
# File 'lib/lunar/sets.rb', line 63

def prefix
  @prefix
end

#wordsObject (readonly)

Returns the value of attribute words.



63
64
65
# File 'lib/lunar/sets.rb', line 63

def words
  @words
end