Class: MotionAL::Library
- Inherits:
-
Object
- Object
- MotionAL::Library
- Defined in:
- lib/motional/library.rb
Overview
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.
Instance Attribute Summary collapse
-
#groups ⇒ Class
readonly
An alias of MotionAL::Group class.
Class Method Summary collapse
-
.instance ⇒ MotionAL::Library
Singleton instance.
Instance Method Summary collapse
-
#al_asset_library ⇒ ALAssetsLibrary
An instance of ALAssetLibrary.
-
#initialize ⇒ Library
constructor
A new instance of Library.
Constructor Details
#initialize ⇒ Library
Returns a new instance of Library.
22 23 24 |
# File 'lib/motional/library.rb', line 22 def initialize @groups = MotionAL::Group end |
Instance Attribute Details
#groups ⇒ Class (readonly)
Returns An alias of MotionAL::Group class.
14 15 16 |
# File 'lib/motional/library.rb', line 14 def groups @groups end |
Class Method Details
.instance ⇒ MotionAL::Library
Returns Singleton instance.
17 18 19 20 |
# File 'lib/motional/library.rb', line 17 def self.instance Dispatch.once { @@instance ||= new } @@instance end |
Instance Method Details
#al_asset_library ⇒ ALAssetsLibrary
An instance of ALAssetLibrary.
28 29 30 |
# File 'lib/motional/library.rb', line 28 def al_asset_library @al_asset_library ||= ALAssetsLibrary.new end |