Class: WIKI::Gps
- Inherits:
-
Object
- Object
- WIKI::Gps
- Defined in:
- lib/meiou/wiki.rb
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
- #id ⇒ Object
-
#initialize(k) ⇒ Gps
constructor
A new instance of Gps.
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 |
#id ⇒ Object
36 |
# File 'lib/meiou/wiki.rb', line 36 def id; @id; end |