module Bones::RPC::Readable
Provides behaviour around readable objects.
@since 0.0.1
Private Instance Methods
cluster()
click to toggle source
Convenience method for getting the cluster from the session.
@api private
@example Get the cluster from the session.
database.cluster
@return [ Cluster
] The cluster.
@since 0.0.1
# File lib/bones/rpc/readable.rb, line 22 def cluster session.cluster end
query_options(options = {})
click to toggle source
Get the query options from the read preference.
@api private
@example Get the query options.
database.query_options
@param [ Hash ] options The existing options on the query.
@return [ Hash ] The new query options.
@since 0.0.1
# File lib/bones/rpc/readable.rb, line 52 def query_options(options = {}) read_preference.query_options(options) end
read_preference()
click to toggle source
Convenience method for getting the read preference from the session.
@api private
@example Get the read preference.
database.read_preference
@return [ Object ] The session's read preference.
@since 0.0.1
# File lib/bones/rpc/readable.rb, line 36 def read_preference session.read_preference end