Class: WIKI::Gps

Inherits:
Object
  • Object
show all
Defined in:
lib/meiou/wiki.rb

Instance Method Summary collapse

Constructor Details

#initialize(k) ⇒ Gps

Returns a new instance of Gps.



26
27
28
29
# File 'lib/meiou/wiki.rb', line 26

def initialize k
  @id = k
  @x = PStore.new("db/gps-#{k}.pstore")
end

Instance Method Details

#[](k) ⇒ Object



30
31
32
# File 'lib/meiou/wiki.rb', line 30

def [] k
  @x.transaction { |db| db[k] }
end

#[]=(k, v) ⇒ Object



33
34
35
# File 'lib/meiou/wiki.rb', line 33

def []= k,v
  @x.transaction { |db| db[k] = v }
end

#idObject



36
# File 'lib/meiou/wiki.rb', line 36

def id; @id; end