Class: FoggyMirror::CSS
- Defined in:
- lib/foggy-mirror/exporters/css.rb
Instance Method Summary collapse
-
#render(hash: false) ⇒ Object
If hash is true it returns a Ruby Hash with the CSS properties instead of a CSS-ready string.
Methods inherited from Exporter
Constructor Details
This class inherits a constructor from FoggyMirror::Exporter
Instance Method Details
#render(hash: false) ⇒ Object
If hash is true it returns a Ruby Hash with the CSS properties instead of a CSS-ready string
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/foggy-mirror/exporters/css.rb', line 8 def render(hash: false) if hash return { 'background-color' => base_color, 'background-image' => radial_gradients.join(', ') } end render(hash: true).map { |k, v| "#{k}: #{v}" }.join(";\n") + ';' end |