Class: Alloy::Config
- Inherits:
-
Object
- Object
- Alloy::Config
- Defined in:
- lib/alloy/config.rb
Instance Method Summary collapse
-
#android_avd_id ⇒ Object
Public: Returns AVD ID string.
-
#android_sdk_path ⇒ Object
Public: Returns path string to Android SDK installation.
-
#app_id ⇒ Object
Public: Returns Application ID.
-
#app_name ⇒ Object
Public: Returns Application Name.
-
#initialize(path) ⇒ Config
constructor
Public: Creates a new config instance.
-
#iphone_sdk_version ⇒ Object
Public: Returns iPhone SDK version string.
-
#project_root ⇒ Object
Public: Returns project root directory path string.
-
#titanium_android_builder ⇒ Object
Public: Returns Titanium Android builder.py path string.
-
#titanium_android_path ⇒ Object
Public: Returns Titanium Android assets directory path string.
-
#titanium_assets_path ⇒ Object
Public: Returns Titanium assets directory path string.
-
#titanium_iphone_builder ⇒ Object
Public: Returns Titanium iPhone builder.py path string.
-
#titanium_iphone_path ⇒ Object
Public: Returns Titanium iPhone assets directory path string.
-
#titanium_sdk_path ⇒ Object
Public: Returns path to Titanium Mobile SDK installation.
-
#titanium_sdk_version ⇒ Object
Public: Returns Titanium Mobile SDK version string.
Constructor Details
Instance Method Details
#android_avd_id ⇒ Object
Public: Returns AVD ID string.
Examples
android_avd_id
# => '1'
Returns the AVD ID String.
99 100 101 |
# File 'lib/alloy/config.rb', line 99 def android_avd_id @json['android']['avd_id'] end |
#android_sdk_path ⇒ Object
Public: Returns path string to Android SDK installation.
Examples
android_sdk_path
# => ''
Returns the path String.
87 88 89 |
# File 'lib/alloy/config.rb', line 87 def android_sdk_path File.(@json['android']['sdk_path']) end |
#app_id ⇒ Object
Public: Returns Application ID
Examples
app_id
# => 'com.example.helloworld'
Returns the Application ID String.
27 28 29 |
# File 'lib/alloy/config.rb', line 27 def app_id @app_id end |
#app_name ⇒ Object
Public: Returns Application Name
Examples
app_name
# => 'HelloWorld'
Returns the Application Name String.
39 40 41 |
# File 'lib/alloy/config.rb', line 39 def app_name @app_name end |
#iphone_sdk_version ⇒ Object
Public: Returns iPhone SDK version string.
Examples
iphone_sdk_version
# => '5.0'
Returns the version String.
75 76 77 |
# File 'lib/alloy/config.rb', line 75 def iphone_sdk_version @json['iphone']['sdk_version'] end |
#project_root ⇒ Object
Public: Returns project root directory path string.
Examples
project_root
# => '/path/to/titanium-project-root'
Returns the AVD ID String.
171 172 173 |
# File 'lib/alloy/config.rb', line 171 def project_root @json['project_root'] end |
#titanium_android_builder ⇒ Object
Public: Returns Titanium Android builder.py path string.
Examples
titanium_android_builder
# => '/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/android/builder.py'
Returns the AVD ID String.
159 160 161 |
# File 'lib/alloy/config.rb', line 159 def titanium_android_builder titanium_android_path + '/builder.py' end |
#titanium_android_path ⇒ Object
Public: Returns Titanium Android assets directory path string.
Examples
titanium_android_path
# => '/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/android'
Returns the AVD ID String.
135 136 137 |
# File 'lib/alloy/config.rb', line 135 def titanium_android_path titanium_assets_path + '/android' end |
#titanium_assets_path ⇒ Object
Public: Returns Titanium assets directory path string.
Examples
titanium_assets_path
# => '/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA'
Returns the AVD ID String.
111 112 113 |
# File 'lib/alloy/config.rb', line 111 def titanium_assets_path titanium_sdk_path + '/mobilesdk/osx/' + titanium_sdk_version end |
#titanium_iphone_builder ⇒ Object
Public: Returns Titanium iPhone builder.py path string.
Examples
titanium_iphone_builder
# => '/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/builder.py'
Returns the AVD ID String.
147 148 149 |
# File 'lib/alloy/config.rb', line 147 def titanium_iphone_builder titanium_iphone_path + '/builder.py' end |
#titanium_iphone_path ⇒ Object
Public: Returns Titanium iPhone assets directory path string.
Examples
titanium_iphone_path
# => '/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone'
Returns the AVD ID String.
123 124 125 |
# File 'lib/alloy/config.rb', line 123 def titanium_iphone_path titanium_assets_path + '/iphone' end |
#titanium_sdk_path ⇒ Object
Public: Returns path to Titanium Mobile SDK installation.
Examples
titanium_sdk_path
# => '/Library/Application Support/Titanium'
Returns the path String.
51 52 53 |
# File 'lib/alloy/config.rb', line 51 def titanium_sdk_path File.(@json['titanium']['sdk_path']) end |
#titanium_sdk_version ⇒ Object
Public: Returns Titanium Mobile SDK version string.
Examples
titanium_sdk_version
# => '1.8.2'
Returns the version String.
63 64 65 |
# File 'lib/alloy/config.rb', line 63 def titanium_sdk_version @titanium_sdk_version end |