Class: PwaManifestGenerator::EdgeSidePanel

Inherits:
Object
  • Object
show all
Defined in:
lib/pwa_manifest_generator/edge_side_panel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_widthObject

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_htmlObject



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