Class: Confetti::Template::WebosAppinfo
- Inherits:
-
Base
- Object
- Mustache
- Base
- Confetti::Template::WebosAppinfo
show all
- Includes:
- JavaChecks
- Defined in:
- lib/confetti/templates/webos_appinfo.rb
Instance Method Summary
collapse
Methods included from JavaChecks
#convert_to_java_identifier, #is_java_identifier, #is_java_package_id
Methods inherited from Base
#initialize
Instance Method Details
#app_id ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 6
def app_id
if @config
if is_java_package_id(@config.package)
@config.package
end
end
end
|
#app_name ⇒ Object
14
15
16
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 14
def app_name
@config.name.name
end
|
#output_filename ⇒ Object
18
19
20
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 18
def output_filename
"appinfo.json"
end
|
#vendor ⇒ Object
34
35
36
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 34
def vendor
@config.author.name
end
|
#version ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/confetti/templates/webos_appinfo.rb', line 22
def version
if @config.version.nil?
'0.0.1'
elsif @config.version.match /^(\d)+[.](\d)+[.](\d)+$/
@config.version
elsif @config.version.match /^((\d)+[.])*(\d)+$/
fix_version(@config.version)
else
fail "need a valid version number of the form 0.0.0"
end
end
|