Class: Arproxy::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/arproxy/proxy.rb

Direct Known Subclasses

ProxyChainTail

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context.



5
6
7
# File 'lib/arproxy/proxy.rb', line 5

def context
  @context
end

#next_proxyObject

Returns the value of attribute next_proxy.



5
6
7
# File 'lib/arproxy/proxy.rb', line 5

def next_proxy
  @next_proxy
end

Instance Method Details

#execute(sql, context) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/arproxy/proxy.rb', line 7

def execute(sql, context)
  unless context.instance_of?(QueryContext)
    raise Arproxy::Error, "`context` is expected a `Arproxy::QueryContext` but got `#{context.class}`"
  end

  next_proxy.execute(sql, context)
end