Class: Middleman::Sprockets::Resource::Error
- Inherits:
-
Object
- Object
- Middleman::Sprockets::Resource::Error
- Includes:
- Contracts
- Defined in:
- lib/middleman-sprockets/resource.rb
Instance Method Summary collapse
-
#initialize(error, ext) ⇒ Error
constructor
A new instance of Error.
- #links ⇒ Object
- #source ⇒ Object (also: #to_s)
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
#links ⇒ Object
60 61 62 |
# File 'lib/middleman-sprockets/resource.rb', line 60 def links Set.new end |
#source ⇒ Object 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 |