Class: RubyCleanCSS::Exports::Http::ServerResponse
- Inherits:
-
Object
- Object
- RubyCleanCSS::Exports::Http::ServerResponse
- Defined in:
- lib/ruby-clean-css/exports.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
faked because ServerResponse actually implements WriteableStream.
-
#statusCode ⇒ Object
Returns the value of attribute statusCode.
Instance Method Summary collapse
-
#initialize(data, status_code) ⇒ ServerResponse
constructor
A new instance of ServerResponse.
- #on(event, callback) ⇒ Object
Constructor Details
#initialize(data, status_code) ⇒ ServerResponse
Returns a new instance of ServerResponse.
252 253 254 255 |
# File 'lib/ruby-clean-css/exports.rb', line 252 def initialize(data, status_code) @data = data @statusCode = status_code end |
Instance Attribute Details
#data ⇒ Object
faked because ServerResponse actually implements WriteableStream
249 250 251 |
# File 'lib/ruby-clean-css/exports.rb', line 249 def data @data end |
#statusCode ⇒ Object
Returns the value of attribute statusCode.
248 249 250 |
# File 'lib/ruby-clean-css/exports.rb', line 248 def statusCode @statusCode end |
Instance Method Details
#on(event, callback) ⇒ Object
258 259 260 261 262 263 264 265 266 |
# File 'lib/ruby-clean-css/exports.rb', line 258 def on(event, callback) case event when 'data' callback.call(@data) else callback.call() end self end |