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.
156 157 158 |
# File 'lib/less/loader.rb', line 156 def initialize(err) @err = err end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
154 155 156 |
# File 'lib/less/loader.rb', line 154 def err @err end |
Instance Method Details
#on(event, callback) ⇒ Object
160 161 162 163 164 165 166 167 |
# File 'lib/less/loader.rb', line 160 def on(event, callback) case event when 'error' callback.call(@err) if @err #only call when error exists else callback.call() end end |