Sha256: b2143175bc7a5acf36b082bfb4d4f9fe55e12effe4414aaf36cc84dce9154e8f

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

module Sastrawi
  module Stemmer
    module Cache
      class ArrayCache
        attr_accessor :data

        def initialize
          @data = {}
        end

        def set(key, value)
          @data[key.to_sym] = value
        end

        def get(key)
          return @data[key.to_sym] if @data.key?(key.to_sym)
        end

        def has?(key)
          @data.key?(key.to_sym)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sastrawi-0.1.0.pre lib/sastrawi/stemmer/cache/array_cache.rb