Class: Less::Loader::Http::HttpGetResult
- Inherits:
-
Object
- Object
- Less::Loader::Http::HttpGetResult
- Defined in:
- lib/less/loader.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
Returns the value of attribute err.
Instance Method Summary collapse
-
#initialize(err) ⇒ HttpGetResult
constructor
A new instance of HttpGetResult.
- #on(event, callback) ⇒ Object
Constructor Details
#initialize(err) ⇒ HttpGetResult
Returns a new instance of HttpGetResult.
197 198 199 |
# File 'lib/less/loader.rb', line 197 def initialize(err) @err = err end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
195 196 197 |
# File 'lib/less/loader.rb', line 195 def err @err end |
Instance Method Details
#on(event, callback) ⇒ Object
201 202 203 204 205 206 207 208 |
# File 'lib/less/loader.rb', line 201 def on(event, callback) case event when 'error' callback.call(@err) if @err #only call when error exists else callback.call() end end |