module BubbleWrap::Device::CameraWrapper

Public Instance Methods

any() click to toggle source

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. @return [Device::Camera] a Camera will always be returned.

# File motion/core/device/ios/camera_wrapper.rb, line 34
def any
  @any ||= BubbleWrap::Device::Camera.any
end
any?() click to toggle source

Should always return true, since picking images from some source is always possible @return [TrueClass]

# File motion/core/device/ios/camera_wrapper.rb, line 44
def any?
  !!any
end
available?() click to toggle source

Verifies that the device running has a physical camera. @return [TrueClass, FalseClass] true will be returned if the device has a physical camera, false otherwise.

# File motion/core/device/ios/camera_wrapper.rb, line 50
def available?
  BubbleWrap::Device::Camera.available?
end
front() click to toggle source

The front-facing camera used to capture media @return [Device::Camera, NilClass] a Camera will be returned if there is a front camera, nil otherwise

# File motion/core/device/ios/camera_wrapper.rb, line 9
def front
  @front ||= BubbleWrap::Device::Camera.front
end
front?() click to toggle source

Verifies that the device running has a front facing camera. @return [TrueClass, FalseClass] true will be returned if the device has a front facing camera, false otherwise.

# File motion/core/device/ios/camera_wrapper.rb, line 15
def front?
  !!front
end
photo_library() click to toggle source

alias for any

# File motion/core/device/ios/camera_wrapper.rb, line 38
def photo_library
  any
end
rear() click to toggle source

The rear-facing camera used to capture media @return [Device::Camera, NilClass] a Camera will be returned if there is a rear camera, nil otherwise

# File motion/core/device/ios/camera_wrapper.rb, line 21
def rear
  @rear ||= BubbleWrap::Device::Camera.rear
end
rear?() click to toggle source

Verifies that the device running has a rear facing camera. @return [TrueClass, FalseClass] true will be returned if the device has a rear facing camera, false otherwise.

# File motion/core/device/ios/camera_wrapper.rb, line 27
def rear?
  !!rear
end