Class: RailsCriticalCss::Config
- Inherits:
-
Object
- Object
- RailsCriticalCss::Config
- Defined in:
- lib/rails_critical_css/config.rb
Class Attribute Summary collapse
- .height ⇒ Object
- .keep_larger_media_queries ⇒ Object
-
.penthouse_options ⇒ Object
writeonly
Sets the attribute penthouse_options.
- .render_wait_time ⇒ Object
- .width ⇒ Object
Class Method Summary collapse
Class Attribute Details
.height ⇒ Object
13 14 15 |
# File 'lib/rails_critical_css/config.rb', line 13 def height @height ||= 900 end |
.keep_larger_media_queries ⇒ Object
21 22 23 |
# File 'lib/rails_critical_css/config.rb', line 21 def keep_larger_media_queries @keep_larger_media_queries ||= false end |
.penthouse_options=(value) ⇒ Object (writeonly)
Sets the attribute penthouse_options
6 7 8 |
# File 'lib/rails_critical_css/config.rb', line 6 def (value) @penthouse_options = value end |
.render_wait_time ⇒ Object
17 18 19 |
# File 'lib/rails_critical_css/config.rb', line 17 def render_wait_time @render_wait_time ||= 2000 end |
.width ⇒ Object
9 10 11 |
# File 'lib/rails_critical_css/config.rb', line 9 def width @width ||= 1200 end |
Class Method Details
.as_json_config(props = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rails_critical_css/config.rb', line 25 def as_json_config(props = {}) { width: width, height: height, keepLargerMediaQueries: keep_larger_media_queries, renderWaitTime: render_wait_time, } .merge!(@penthouse_options || {}) .merge!(props) end |