Class: Confetti::Template::WebosAppinfo
Constant Summary
Constants included
from JavaChecks
JavaChecks::RESERVED_WORDS
Instance Method Summary
collapse
#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
Instance Method Details
#app_id ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 7
def app_id
pkg = convert_to_java_package_id(@config.package).downcase
pkg.gsub!(/[^0-9a-z.]/,'')
if is_java_package_id(pkg)
pkg
else
'com.phonegap.app'
end
end
|
#app_name ⇒ Object
18
19
20
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 18
def app_name
@config.name.name
end
|
#output_filename ⇒ Object
22
23
24
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 22
def output_filename
"appinfo.json"
end
|
#tablet_support? ⇒ Boolean
34
35
36
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 34
def tablet_support?
true unless @config.preference("target-device")
end
|
#vendor ⇒ Object
30
31
32
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 30
def vendor
@config.author.name
end
|
#version ⇒ Object
26
27
28
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 26
def version
normalize_version(@config.version_string)
end
|