Class: ProxyPacRb::Runtime::Context

Inherits:
Object
  • Object
show all
Includes:
Encoding
Defined in:
lib/proxy_pac_rb/runtime.rb

Overview

Context

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Encoding

#encode

Constructor Details

#initialize(_runtime, _source = '') ⇒ Context

Returns a new instance of Context.



17
18
# File 'lib/proxy_pac_rb/runtime.rb', line 17

def initialize(_runtime, _source = '')
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



9
10
11
# File 'lib/proxy_pac_rb/runtime.rb', line 9

def context
  @context
end

Instance Method Details

#call(_properties, *_args) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/proxy_pac_rb/runtime.rb', line 28

def call(_properties, *_args)
  raise NotImplementedError
end

#eval(_source, _options = {}) ⇒ Object

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/proxy_pac_rb/runtime.rb', line 24

def eval(_source, _options = {})
  raise NotImplementedError
end

#exec(_source, _options = {}) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/proxy_pac_rb/runtime.rb', line 20

def exec(_source, _options = {})
  raise NotImplementedError
end

#include(environment) ⇒ Object



11
12
13
14
15
# File 'lib/proxy_pac_rb/runtime.rb', line 11

def include(environment)
  environment.available_methods.each do |name|
    context[name] = environment.method(name)
  end
end