Module Rucola::RCApp
In: lib/rucola/rucola_support/rc_app.rb

Methods

Public Instance methods

Returns the name of the application as specified in the Info.plist file.

  Rucola::RCApp.app_name #=> 'MyApp'

Returns the path to the application support directory for this application.

  Rucola::RCApp.application_support_path #=> '/Users/eddy/Library/Application Support/MyApp/'

Returns the path to the current used app/assets dir.

So in debug & test mode this will point to your development source_root/app/assets.

In release however this will point to the equivalent of:

  NSBundle.mainBundle.resourcePath + 'app/assets'

Returns the path to the current used app/controllers dir.

So in debug & test mode this will point to your development source_root/app/controllers.

In release however this will point to the equivalent of:

  NSBundle.mainBundle.resourcePath + 'app/controllers'

Returns the current RUBYCOCOA_ENV, which normally is ‘debug’ during development, test in the tests and ‘release’ in a release.

Returns the path to the current used app/models dir.

So in debug & test mode this will point to your development source_root/app/models.

In release however this will point to the equivalent of:

  NSBundle.mainBundle.resourcePath + 'app/models'

Returns the path to an asset file.

  Rucola::RCApp.path_for_asset('somefile.png') #=> 'root/app/assets/somefile.png'

Returns the path to a controller file.

  Rucola::RCApp.path_for_controller(ApplicationController) #=> 'root/app/controllers/application_controller.rb'

Returns the path to a model file.

  Rucola::RCApp.path_for_model(Person) #=> 'root/app/models/person.rb'

Returns the path to a view file.

  Rucola::RCApp.path_for_controller('preferences') #=> 'root/app/views/Preferences.nib'
  Rucola::RCApp.path_for_controller('Preferences') #=> 'root/app/views/Preferences.nib'

  Rucola::RCApp.path_for_controller(PreferencesController) #=> 'root/app/views/Preferences.nib'
  Rucola::RCApp.path_for_controller(PreferencesController.alloc.init) #=> 'root/app/views/Preferences.nib'

Returns the path to the current source root of the application.

So in debug & test mode this will point to your development source root.

In release however this will point to the equivalent of: NSBundle.mainBundle.resourcePath

Returns the path to the current used app/views dir.

So in debug & test mode this will point to your development source_root/app/views.

In release however this will point to the equivalent of:

  NSBundle.mainBundle.resourcePath + 'app/views'

[Validate]