motion-assets-library 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9416c992c984c20be75b94e25de14015422b1b41
4
- data.tar.gz: 4ba5af4191c8bf8783705561dd94b8e4eb4c4d4c
3
+ metadata.gz: ae60627d5fcf001d02990ac44609f6c0d5ed3764
4
+ data.tar.gz: bdd66da4c30fffa15d8bdd0e198e280f31c2a0aa
5
5
  SHA512:
6
- metadata.gz: d14d3e289b83faaead1cf6acec55d8e0f0ffdcd6cc610dfac1960cfd5fd0b249c67b9d0756450322ff2032a2f827be86151492f3964595db5b643596c9acafb8
7
- data.tar.gz: 6e6c16e1e8a405334a09282ee77a4489671d8dea0f4e8e3e075b3dfacd084f055f7f7d19e0692ea9d93fa4a04297adacbd51e4c1610bbdb38831a3954b20517f
6
+ metadata.gz: faf250119a22cde0e397229d9e38689bf655dc231ed34b7a5365e5692f6a5df3504e3e6109b400c912211d3e72b0a397b7be6564b5563c652cb8872976a2ab8f
7
+ data.tar.gz: 00c4f9802505a39fd9ebdf0fe604d7208044b49de91ffed844370bd1464a2aba7bf526c0b99847de5e871cea803cbb0e148a742b9c4f1b4eff312f83b21d90b0
@@ -3,10 +3,6 @@ class Motion
3
3
  class Loader
4
4
  attr_accessor :delegate
5
5
 
6
- def initialize
7
- listen_to_asset_library
8
- end
9
-
10
6
  def load_assets
11
7
  assets_library.enumerateGroupsWithTypes(
12
8
  ALAssetsGroupSavedPhotos,
@@ -31,33 +27,17 @@ class Motion
31
27
  end
32
28
 
33
29
  def reset_assets
34
- @_assets = []
30
+ @assets = []
35
31
 
36
32
  load_assets
37
33
  end
38
34
 
39
35
  def assets
40
- @_assets ||= []
36
+ @assets ||= []
41
37
  end
42
38
 
43
39
  private
44
40
 
45
- def listen_to_asset_library
46
- notification_center.addObserver(
47
- self,
48
- selector: 'asset_library_did_change:',
49
- name: ALAssetsLibraryChangedNotification,
50
- object: nil)
51
- end
52
-
53
- def asset_library_did_change(notification)
54
- reset_assets
55
- end
56
-
57
- def dealloc
58
- notification_center.removeObserver(self)
59
- end
60
-
61
41
  def album_block
62
42
  lambda { |group, stop| group.enumerateAssetsWithOptions(asset_enumeration_options, usingBlock: asset_block) if group }
63
43
  end
@@ -95,11 +75,7 @@ class Motion
95
75
  end
96
76
 
97
77
  def assets_library
98
- @_assets_library ||= ALAssetsLibrary.alloc.init
99
- end
100
-
101
- def notification_center
102
- NSNotificationCenter.defaultCenter
78
+ @assets_library ||= ALAssetsLibrary.alloc.init
103
79
  end
104
80
 
105
81
  def asset_enumeration_options
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-assets-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-23 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake