Module: BubbleWrap::Device::CameraWrapper

Defined in:
motion/core/device/ios/camera_wrapper.rb

Class Method Summary collapse

Class Method Details

.anyDevice::Camera

A Device::Camera used to capture media; by default it will use the :photo_library source type See Device::Camera docs for more source type options.


34
35
36
# File 'motion/core/device/ios/camera_wrapper.rb', line 34

def any
  @any ||= BubbleWrap::Device::Camera.any
end

.any?TrueClass

Should always return true, since picking images from some source is always possible


44
45
46
# File 'motion/core/device/ios/camera_wrapper.rb', line 44

def any?
  !!any
end

.available?TrueClass, FalseClass

Verifies that the device running has a physical camera.


50
51
52
# File 'motion/core/device/ios/camera_wrapper.rb', line 50

def available?
  BubbleWrap::Device::Camera.available?
end

.frontDevice::Camera, NilClass

The front-facing camera used to capture media


9
10
11
# File 'motion/core/device/ios/camera_wrapper.rb', line 9

def front
  @front ||= BubbleWrap::Device::Camera.front
end

.front?TrueClass, FalseClass

Verifies that the device running has a front facing camera.


15
16
17
# File 'motion/core/device/ios/camera_wrapper.rb', line 15

def front?
  !!front
end

.photo_libraryObject

alias for any


38
39
40
# File 'motion/core/device/ios/camera_wrapper.rb', line 38

def photo_library
  any
end

.rearDevice::Camera, NilClass

The rear-facing camera used to capture media


21
22
23
# File 'motion/core/device/ios/camera_wrapper.rb', line 21

def rear
  @rear ||= BubbleWrap::Device::Camera.rear
end

.rear?TrueClass, FalseClass

Verifies that the device running has a rear facing camera.


27
28
29
# File 'motion/core/device/ios/camera_wrapper.rb', line 27

def rear?
  !!rear
end