Class: Middleman::Sprockets::Resource::Error

Inherits:
Object
  • Object
show all
Includes:
Contracts
Defined in:
lib/middleman-sprockets/resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(error, ext) ⇒ Error

Returns a new instance of Error.



54
55
56
57
# File 'lib/middleman-sprockets/resource.rb', line 54

def initialize error, ext
  @error = error
  @ext   = ext
end

Instance Method Details



60
61
62
# File 'lib/middleman-sprockets/resource.rb', line 60

def links
  Set.new
end

#sourceObject Also known as: to_s



65
66
67
68
69
70
71
72
# File 'lib/middleman-sprockets/resource.rb', line 65

def source
  case @ext
  when '.css' then css_response
  when '.js' then js_response
  else
    default_response
  end
end