Class: JsDuck::Web::Css
- Inherits:
-
Object
- Object
- JsDuck::Web::Css
- Defined in:
- lib/jsduck/web/css.rb
Overview
Writes the CSS gathered from Tag classes and –css option into given file. Then Renames the file so it contains an MD5 hash inside it, returning the resulting fingerprinted name.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Css
constructor
A new instance of Css.
- #write(filename) ⇒ Object
Constructor Details
#initialize(opts) ⇒ Css
13 14 15 |
# File 'lib/jsduck/web/css.rb', line 13 def initialize(opts) @opts = opts end |
Instance Method Details
#write(filename) ⇒ Object
17 18 19 20 |
# File 'lib/jsduck/web/css.rb', line 17 def write(filename) File.open(filename, 'w') {|f| f.write(all_css) } Util::MD5.rename(filename) end |