Module: Riik
- Defined in:
- lib/riik.rb,
lib/riik/version.rb,
lib/riik/document.rb,
lib/riik/document/finders.rb,
lib/riik/document/persistence.rb
Overview
Riik is a lightweight object mapper for Riak.
To define a class:
class Person
include Riik::Document
property :first_name
property :last_name
end
To use:
p = Person.new(:first_name => 'Fat', :last_name => 'Mike')
p.save # => true
p.destroy # => true
Person.find(p.key) # => p
Defined Under Namespace
Modules: Document
Constant Summary collapse
- VERSION =
"0.3.0"
Class Method Summary collapse
Class Method Details
.client ⇒ Object
34 35 36 |
# File 'lib/riik.rb', line 34 def client @client ||= Riak::Client.new end |
.client=(client) ⇒ Object
30 31 32 |
# File 'lib/riik.rb', line 30 def client=(client) @client = client end |