Class: Dyndnsd::Responder::DynDNSStyle
- Inherits:
-
Object
- Object
- Dyndnsd::Responder::DynDNSStyle
- Defined in:
- lib/dyndnsd/responder/dyndns_style.rb
Instance Method Summary collapse
- #call(env) ⇒ Array{Integer,Hash{String => String},Array<String>}
-
#initialize(app) ⇒ DynDNSStyle
constructor
A new instance of DynDNSStyle.
Constructor Details
#initialize(app) ⇒ DynDNSStyle
Returns a new instance of DynDNSStyle.
7 8 9 |
# File 'lib/dyndnsd/responder/dyndns_style.rb', line 7 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Array{Integer,Hash{String => String},Array<String>}
13 14 15 16 17 18 19 20 21 |
# File 'lib/dyndnsd/responder/dyndns_style.rb', line 13 def call(env) @app.call(env).tap do |status_code, headers, body| if headers.key?('X-DynDNS-Response') return decorate_dyndnsd_response(status_code, headers, body) else return decorate_other_response(status_code, headers, body) end end end |