Class: Less::Loader::Http::HttpGetResult

Inherits:
Object
  • Object
show all
Defined in:
lib/less/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errObject

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