Class: Rack::Lettering
- Inherits:
-
Object
- Object
- Rack::Lettering
- Defined in:
- lib/rack/lettering.rb,
lib/rack/lettering/version.rb
Constant Summary collapse
- VERSION =
'0.1.1'
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Lettering
constructor
A new instance of Lettering.
Constructor Details
#initialize(app, options = {}) ⇒ Lettering
Returns a new instance of Lettering.
7 8 9 10 11 12 |
# File 'lib/rack/lettering.rb', line 7 def initialize(app, = {}) @app = app @words = [:words] || [] @letters = [:letters] || [] @lines = [:lines] || [] end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rack/lettering.rb', line 14 def call(env) status, @headers, @body = @app.call(env) if html? apply_lettering update_content_length end [status, @headers, @body] end |