Class: Less::Loader::HttpNodeObj
- Inherits:
-
Object
- Object
- Less::Loader::HttpNodeObj
- Defined in:
- lib/less/loader.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
Returns the value of attribute err.
Instance Method Summary collapse
-
#initialize(err) ⇒ HttpNodeObj
constructor
A new instance of HttpNodeObj.
- #on(event, callback) ⇒ Object
Constructor Details
#initialize(err) ⇒ HttpNodeObj
Returns a new instance of HttpNodeObj.
140 141 142 |
# File 'lib/less/loader.rb', line 140 def initialize(err) @err = err end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err.
138 139 140 |
# File 'lib/less/loader.rb', line 138 def err @err end |
Instance Method Details
#on(event, callback) ⇒ Object
144 145 146 147 148 149 150 151 |
# File 'lib/less/loader.rb', line 144 def on(event, callback) case event when 'error' callback.call(@err) if @err #only call when error exists else callback.call() end end |