class Sastrawi::Stemmer::Cache::ArrayCache

Attributes

data[R]

Public Class Methods

new() click to toggle source
# File lib/sastrawi/stemmer/cache/array_cache.rb, line 7
def initialize
  @data = {}
end

Public Instance Methods

get(key) click to toggle source
# File lib/sastrawi/stemmer/cache/array_cache.rb, line 15
def get(key)
  @data[key.to_sym] if @data.key?(key.to_sym)
end
has?(key) click to toggle source
# File lib/sastrawi/stemmer/cache/array_cache.rb, line 19
def has?(key)
  @data.key?(key.to_sym)
end
set(key, value) click to toggle source
# File lib/sastrawi/stemmer/cache/array_cache.rb, line 11
def set(key, value)
  @data[key.to_sym] = value
end