Class: PwaManifestGenerator::EdgeSidePanel
- Inherits:
-
Object
- Object
- PwaManifestGenerator::EdgeSidePanel
- Defined in:
- lib/pwa_manifest_generator/edge_side_panel.rb
Instance Attribute Summary collapse
-
#preferred_width ⇒ Object
Returns the value of attribute preferred_width.
Instance Method Summary collapse
-
#initialize(preferred_width: 400) ⇒ EdgeSidePanel
constructor
A new instance of EdgeSidePanel.
- #to_html ⇒ Object
Constructor Details
#initialize(preferred_width: 400) ⇒ EdgeSidePanel
Returns a new instance of EdgeSidePanel.
9 10 11 |
# File 'lib/pwa_manifest_generator/edge_side_panel.rb', line 9 def initialize(preferred_width: 400) @preferred_width = preferred_width end |
Instance Attribute Details
#preferred_width ⇒ Object
Returns the value of attribute preferred_width.
7 8 9 |
# File 'lib/pwa_manifest_generator/edge_side_panel.rb', line 7 def preferred_width @preferred_width end |
Instance Method Details
#to_html ⇒ Object
13 14 15 16 |
# File 'lib/pwa_manifest_generator/edge_side_panel.rb', line 13 def to_html json = { preferred_width: @preferred_width }.to_json json.respond_to?(:html_safe) ? json.html_safe : json end |