Class: RiakJson::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/riak_json/query.rb

Overview

Query helper object Provides a DSL for building json queries to collections

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



25
26
27
# File 'lib/riak_json/query.rb', line 25

def body
  @body
end

Class Method Details

.from_json(json) ⇒ Object

Create a Query object instance with a custom-built query



28
29
30
31
32
# File 'lib/riak_json/query.rb', line 28

def self.from_json(json)
  query = RiakJson::Query.new
  query.body = json
  query
end