Class: PwaManifestGenerator::LaunchHandler
- Inherits:
-
Object
- Object
- PwaManifestGenerator::LaunchHandler
- Includes:
- Freezeable
- Defined in:
- lib/pwa_manifest_generator/launch_handler.rb
Instance Attribute Summary collapse
-
#client_mode ⇒ Object
Returns the value of attribute client_mode.
Instance Method Summary collapse
-
#initialize ⇒ LaunchHandler
constructor
A new instance of LaunchHandler.
- #to_html ⇒ Object
- #valid? ⇒ Boolean
Methods included from Freezeable
Constructor Details
#initialize ⇒ LaunchHandler
Returns a new instance of LaunchHandler.
12 13 14 |
# File 'lib/pwa_manifest_generator/launch_handler.rb', line 12 def initialize @client_mode = [] end |
Instance Attribute Details
#client_mode ⇒ Object
Returns the value of attribute client_mode.
10 11 12 |
# File 'lib/pwa_manifest_generator/launch_handler.rb', line 10 def client_mode @client_mode end |
Instance Method Details
#to_html ⇒ Object
20 21 22 23 |
# File 'lib/pwa_manifest_generator/launch_handler.rb', line 20 def to_html json = { client_mode: @client_mode }.to_json json.respond_to?(:html_safe) ? json.html_safe : json end |
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/pwa_manifest_generator/launch_handler.rb', line 16 def valid? @client_mode.is_a?(Array) end |