module CQL::Queriable
A mix-in module containing methods used by objects that want to be able to run queries against objects (often themselves).
Attributes
query_root[RW]
The object against which the query will be run.
Public Instance Methods
query(&block)
click to toggle source
Performs a query against the current query_root
# File lib/cql/queriable.rb, line 12 def query(&block) raise(ArgumentError, 'Query cannot be run. No query root has been set.') unless @query_root Query.new(@query_root, &block).data end