dotnetguyuk/kue — Issue #1: Little changes, maybe they are useful
Author: wiiikiii
Created: 2011-12-27 11:33:20+00:00
State: open

I've changed some things I thought they are maybe nicer looking or ...
Please decide by your own, if there is something useful.

```ruby
module ClassMethods

def keys
KueStore.all.map( &:key ).map( &:to_sym )
end

def [](key)
entry = KueStore.find_by_key( key )
if entry
YAML.load( entry.value )
else
nil
end
end

def []=(key, value)
item = KueStore.find_or_create_by_key( key )
item.value = value.to_yaml
item.save!
end

def delete!( key )
KueStore.delete_all( :key => key )
end

def extists?( key )
self[ key ].present?
end

def clear!
KueStore.destroy_all
end

end
```