Class: Confetti::Template::WebosAppinfo

Inherits:
Base
  • Object
show all
Includes:
JavaChecks, VersionHelper
Defined in:
lib/confetti/templates/webos_appinfo.rb

Constant Summary

Constants included from JavaChecks

JavaChecks::RESERVED_WORDS

Instance Method Summary collapse

Methods included from VersionHelper

#normalize_version

Methods included from JavaChecks

#convert_to_java_identifier, #convert_to_java_package_id, #is_java_identifier, #is_java_package_id, #reserved_word?

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Confetti::Template::Base

Instance Method Details

#app_idObject



7
8
9
10
11
12
13
# File 'lib/confetti/templates/webos_appinfo.rb', line 7

def app_id
  if @config
    if is_java_package_id(@config.package)
      @config.package
    end
  end
end

#app_nameObject



15
16
17
# File 'lib/confetti/templates/webos_appinfo.rb', line 15

def app_name
  @config.name.name
end

#output_filenameObject



19
20
21
# File 'lib/confetti/templates/webos_appinfo.rb', line 19

def output_filename
  "appinfo.json"
end

#tablet_support?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/confetti/templates/webos_appinfo.rb', line 31

def tablet_support?
  true unless @config.preference("target-device")
end

#vendorObject



27
28
29
# File 'lib/confetti/templates/webos_appinfo.rb', line 27

def vendor
  @config.author.name
end

#versionObject



23
24
25
# File 'lib/confetti/templates/webos_appinfo.rb', line 23

def version
  normalize_version(@config.version_string)
end