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.
189 190 191 |
# File 'lib/less/loader.rb', line 189 def initialize(err) @err = err end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
187 188 189 |
# File 'lib/less/loader.rb', line 187 def err @err end |
Instance Method Details
#on(event, callback) ⇒ Object
193 194 195 196 197 198 199 200 |
# File 'lib/less/loader.rb', line 193 def on(event, callback) case event when 'error' callback.call(@err) if @err #only call when error exists else callback.call() end end |