Class: Paste::Parser::Sprockets
- Inherits:
-
Object
- Object
- Paste::Parser::Sprockets
- Defined in:
- lib/paste/parser/sprockets.rb
Instance Attribute Summary collapse
-
#glue ⇒ Object
readonly
Returns the value of attribute glue.
-
#secretary ⇒ Object
readonly
Returns the value of attribute secretary.
-
#sources ⇒ Object
readonly
Returns the value of attribute sources.
Instance Method Summary collapse
- #css_dependencies ⇒ Object
-
#initialize(glue, sources) ⇒ Sprockets
constructor
A new instance of Sprockets.
- #js_dependencies ⇒ Object
- #reset! ⇒ Object
Constructor Details
#initialize(glue, sources) ⇒ Sprockets
Returns a new instance of Sprockets.
11 12 13 14 15 |
# File 'lib/paste/parser/sprockets.rb', line 11 def initialize glue, sources @glue = glue @sources = sources reset! end |
Instance Attribute Details
#glue ⇒ Object (readonly)
Returns the value of attribute glue.
7 8 9 |
# File 'lib/paste/parser/sprockets.rb', line 7 def glue @glue end |
#secretary ⇒ Object (readonly)
Returns the value of attribute secretary.
7 8 9 |
# File 'lib/paste/parser/sprockets.rb', line 7 def secretary @secretary end |
#sources ⇒ Object (readonly)
Returns the value of attribute sources.
7 8 9 |
# File 'lib/paste/parser/sprockets.rb', line 7 def sources @sources end |
Instance Method Details
#css_dependencies ⇒ Object
22 23 24 25 |
# File 'lib/paste/parser/sprockets.rb', line 22 def css_dependencies generate_dependencies if @css_dependencies.nil? @css_dependencies end |
#js_dependencies ⇒ Object
17 18 19 20 |
# File 'lib/paste/parser/sprockets.rb', line 17 def js_dependencies generate_dependencies if @js_dependencies.nil? @js_dependencies end |
#reset! ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/paste/parser/sprockets.rb', line 27 def reset! @js_dependencies = @css_dependencies = nil @secretary = ::Sprockets::Secretary.new( :root => glue.root, :expand_paths => false, :load_path => glue.load_path, :source_files => @sources.map{ |s| glue.find s } ) rescue ::Sprockets::LoadError => e raise ResolveError.new(e.) end |