class MotionAL::Library

A wrapper of ALAssetLibrary class.

An instance of ALAssetsLibrary provides access to the videos and photos that are under the control of the Photos application.
The library includes those that are in the Saved Photos album, those coming from iTunes, and those that were directly imported into the device. You use it to retrieve the list of all asset groups and to save images and videos into the Saved Photos album.

And added some convinience methods.

Attributes

groups[R]

@return [Class] An alias of MotionAL::Group class

Public Class Methods

instance() click to toggle source

@return [MotionAL::Library] Singleton instance.

# File lib/motional/library.rb, line 16
def self.instance
  Dispatch.once { @@instance ||= new }
  @@instance
end
new() click to toggle source
# File lib/motional/library.rb, line 21
def initialize 
  @groups = MotionAL::Group
end

Public Instance Methods

al_asset_library() click to toggle source

An instance of ALAssetLibrary. @return [ALAssetsLibrary]

# File lib/motional/library.rb, line 27
def al_asset_library
  @al_asset_library ||= ALAssetsLibrary.new
end