Class: Rack::Rekon::ResponseRewriters::RekonJS

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/rekon/response_rewriters/rekon_js.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_root, js) ⇒ RekonJS

Returns a new instance of RekonJS.



6
7
8
# File 'lib/rack/rekon/response_rewriters/rekon_js.rb', line 6

def initialize(app_root, js)
  @app_root, @js = app_root, js
end

Instance Attribute Details

#app_rootObject (readonly)

Returns the value of attribute app_root.



5
6
7
# File 'lib/rack/rekon/response_rewriters/rekon_js.rb', line 5

def app_root
  @app_root
end

#jsObject (readonly)

Returns the value of attribute js.



5
6
7
# File 'lib/rack/rekon/response_rewriters/rekon_js.rb', line 5

def js
  @js
end

Instance Method Details

#rewritten_bodyObject



10
11
12
13
# File 'lib/rack/rekon/response_rewriters/rekon_js.rb', line 10

def rewritten_body
  ensure_rewritten!
  js
end