Class: Webspicy::Web::Inferer

Inherits:
Rack::Proxy
  • Object
show all
Defined in:
lib/webspicy/web/inferer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, options = nil) ⇒ Inferer

Returns a new instance of Inferer.



6
7
8
9
10
# File 'lib/webspicy/web/inferer.rb', line 6

def initialize(config, options = nil)
  @webspicy_config = config
  @webspicy_options = options || options_from_env
  super(proxy_options)
end

Instance Attribute Details

#webspicy_configObject (readonly)

Returns the value of attribute webspicy_config.



11
12
13
# File 'lib/webspicy/web/inferer.rb', line 11

def webspicy_config
  @webspicy_config
end

#webspicy_optionsObject (readonly)

Returns the value of attribute webspicy_options.



11
12
13
# File 'lib/webspicy/web/inferer.rb', line 11

def webspicy_options
  @webspicy_options
end

Instance Method Details

#rewrite_env(env) ⇒ Object



13
14
15
16
17
# File 'lib/webspicy/web/inferer.rb', line 13

def rewrite_env(env)
  env = env.merge(static_env)
  env = handle_path_info(env)
  env
end

#rewrite_response(triplet) ⇒ Object



19
20
21
# File 'lib/webspicy/web/inferer.rb', line 19

def rewrite_response(triplet)
  triplet
end