module OrientSupport
require_relative 'default_formatter'
Constants
- MatchAttributes
MatchConnection
###############################- MatchSAttributes
MatchStatement
################################- QueryAttributes
OrientQuery
###################################
Public Class Methods
new(uri = '')
click to toggle source
Makes a new object.
You can even ignore the argument, which will produce an empty URI.
# File lib/support/query.rb, line 73 def initialize(uri = '') @uri = URI(uri) end
Public Instance Methods
cut(path = '/')
click to toggle source
# File lib/support/query.rb, line 40 def cut(path = '/') modify do |c| c.query = nil c.path = path c.fragment = nil end end
over(hash)
click to toggle source
Replace query argument(s).
Iri.new('https://google.com?q=test').over(q: 'hey you!')
# File lib/support/query.rb, line 60 def over(hash) modify_query do |params| hash.each do |k, v| params[k.to_s] = [] unless params[k] params[k.to_s] = [v] end end end
query(val)
click to toggle source
Replace the query part of the URI.
# File lib/support/query.rb, line 50 def query(val) modify do |c| c.query = val end end
to_s()
click to toggle source
Convert it to a string.
# File lib/support/query.rb, line 78 def to_s @uri.to_s end
to_uri()
click to toggle source
Convert it to an object of class URI
.
# File lib/support/query.rb, line 83 def to_uri @uri.clone end