Class: MotionSplash::Config
- Inherits:
-
Object
- Object
- MotionSplash::Config
- Defined in:
- lib/motion-splash/config.rb
Constant Summary collapse
- PROPERTIES =
{ controller_class: "SplashController", images_dir: File.join(Dir.pwd,"resources"), app_delegate_file: File.join(Dir.pwd, "app", "app_delegate.rb"), sizes: [[[320, 480], 1], [[320, 480], 2], [[320, 568], 2], [[375, 667], 2], [[414, 736], 3]], image_name: "Default", exclude_scales: [], exclude_sizes: [], custom_sizes: [] }
Instance Method Summary collapse
- #finish ⇒ Object
- #info_plist ⇒ Object
-
#initialize(app = nil) ⇒ Config
constructor
A new instance of Config.
- #prefix ⇒ Object
Constructor Details
#initialize(app = nil) ⇒ Config
Returns a new instance of Config.
3 4 5 6 |
# File 'lib/motion-splash/config.rb', line 3 def initialize(app = nil) @app = app @properties_set = [] end |
Instance Method Details
#finish ⇒ Object
46 47 48 49 50 51 |
# File 'lib/motion-splash/config.rb', line 46 def finish (PROPERTIES.keys - @properties_set.dup).each do |property| default_value = PROPERTIES[property] info_plist["#{prefix}#{property}"] = default_value end end |
#info_plist ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/motion-splash/config.rb', line 8 def info_plist @info_plist ||= begin if @app @app.info_plist else NSBundle.mainBundle.infoDictionary end rescue {} end end |
#prefix ⇒ Object
31 32 33 |
# File 'lib/motion-splash/config.rb', line 31 def prefix "_splash_" end |