Class: PwaManifestGenerator::LaunchHandler

Inherits:
Object
  • Object
show all
Includes:
Freezeable
Defined in:
lib/pwa_manifest_generator/launch_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Freezeable

included

Constructor Details

#initializeLaunchHandler

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_modeObject

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_htmlObject



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

Returns:

  • (Boolean)


16
17
18
# File 'lib/pwa_manifest_generator/launch_handler.rb', line 16

def valid?
  @client_mode.is_a?(Array)
end