Module: BubbleWrap

Defined in:
motion/core/app.rb,
lib/bubble-wrap/loader.rb,
lib/bubble-wrap/version.rb,
lib/bubble-wrap/requirement.rb,
lib/bubble-wrap/ext/motion_project_app.rb,
lib/bubble-wrap/ext/motion_project_config.rb,
lib/bubble-wrap/requirement/path_manipulation.rb,
motion/core.rb,
motion/http.rb,
motion/reactor.rb,
motion/shortcut.rb,
motion/core/kvo.rb,
motion/core/json.rb,
motion/rss_parser.rb,
motion/core/device.rb,
motion/core/string.rb,
motion/media/media.rb,
motion/media/player.rb,
motion/reactor/queue.rb,
motion/reactor/timer.rb,
motion/reactor/future.rb,
motion/core/persistence.rb,
motion/location/location.rb,
motion/reactor/eventable.rb,
motion/core/device/camera.rb,
motion/reactor/deferrable.rb,
motion/core/device/screen.rb,
motion/reactor/periodic_timer.rb,
motion/core/device/camera_wrapper.rb,
motion/reactor/default_deferrable.rb

Overview

Provides a nice DSL for interacting with the standard UIImagePickerController

Defined Under Namespace

Modules: App, CLLocationWrap, Device, Ext, HTTP, JSON, KVO, Location, Media, Persistence, Reactor, String Classes: RSSParser, Requirement

Constant Summary collapse

LOADER_PRESENT =
true
VERSION =
'1.1.2'
SETTINGS =
{}

Class Method Summary collapse

Class Method Details

.create_uuidObject


23
24
25
26
# File 'motion/core.rb', line 23

def create_uuid
  uuid = CFUUIDCreate(nil)
  CFUUIDCreateString(nil, uuid)
end

.debug=(val) ⇒ Object


8
9
10
# File 'motion/shortcut.rb', line 8

def self.debug=(val)
  BubbleWrap::SETTINGS[:debug] = val
end

.debug?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'motion/shortcut.rb', line 12

def self.debug?
  BubbleWrap::SETTINGS[:debug]
end

.localized_string(key, value) ⇒ Object


14
15
16
# File 'motion/core.rb', line 14

def localized_string(key, value)
  NSBundle.mainBundle.localizedStringForKey(key, value:value, table:nil)
end

.p(arg) ⇒ Object

I had issues with #p on the device, this is a temporary workaround


19
20
21
# File 'motion/core.rb', line 19

def p(arg)
  NSLog arg.inspect
end

.require(file_spec, &block) ⇒ Object


20
21
22
# File 'lib/bubble-wrap/loader.rb', line 20

def require(file_spec, &block)
  Requirement.scan(caller.first, file_spec, &block)
end

.rgb_color(r, g, b) ⇒ UIcolor

Returns:

  • (UIcolor)

5
6
7
# File 'motion/core.rb', line 5

def rgb_color(r,g,b)
  rgba_color(r,g,b,1)
end

.rgba_color(r, g, b, a) ⇒ UIcolor

Returns:

  • (UIcolor)

10
11
12
# File 'motion/core.rb', line 10

def rgba_color(r,g,b,a)
  UIColor.colorWithRed((r/255.0), green:(g/255.0), blue:(b/255.0), alpha:a)
end

.rootObject


16
17
18
# File 'lib/bubble-wrap/loader.rb', line 16

def root
  File.expand_path('../../../', __FILE__)
end