Class: Less::Loader::ServerResponse
- Inherits:
-
Object
- Object
- Less::Loader::ServerResponse
- Defined in:
- lib/less/loader.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
faked because ServerResponse acutally 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
158 159 160 161 |
# File 'lib/less/loader.rb', line 158 def initialize(data, status_code) @data = data @statusCode = status_code end |
Instance Attribute Details
#data ⇒ Object
faked because ServerResponse acutally implements WriteableStream
156 157 158 |
# File 'lib/less/loader.rb', line 156 def data @data end |
#statusCode ⇒ Object
Returns the value of attribute statusCode.
155 156 157 |
# File 'lib/less/loader.rb', line 155 def statusCode @statusCode end |
Instance Method Details
#on(event, callback) ⇒ Object
163 164 165 166 167 168 169 170 |
# File 'lib/less/loader.rb', line 163 def on(event, callback) case event when 'data' callback.call(@data) else callback.call() end end |