royw-tmdb 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION.yml +2 -2
  2. data/lib/object_extensions.rb +16 -11
  3. metadata +2 -2
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 0
3
3
  :major: 0
4
- :minor: 0
4
+ :minor: 1
@@ -1,19 +1,24 @@
1
1
  # == Synopsis
2
2
  # add a blank? method to all Objects
3
3
  class Object
4
- # return asserted if object is nil or empty
5
- # TODO: not the safest coding, probably should dup before stripping. Maybe should also compact
6
- def blank?
7
- result = nil?
8
- unless result
9
- if respond_to? 'empty?'
10
- if respond_to? 'strip'
11
- result = strip.empty?
12
- else
13
- result = empty?
4
+ my_extension("blank?") do
5
+ # return asserted if object is nil or empty
6
+ def blank?
7
+ result = nil?
8
+ unless result
9
+ if respond_to? 'empty?'
10
+ if respond_to? 'strip'
11
+ result = strip.empty?
12
+ else
13
+ if respond_to? 'compact'
14
+ result = compact.empty?
15
+ else
16
+ result = empty?
17
+ end
18
+ end
14
19
  end
15
20
  end
21
+ result
16
22
  end
17
- result
18
23
  end
19
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: royw-tmdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roy Wright
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-16 00:00:00 -07:00
12
+ date: 2009-04-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15