royw-imdb 0.0.21 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +2 -2
  2. data/lib/object_extensions.rb +16 -11
  3. metadata +2 -2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 0
3
- :patch: 21
2
+ :minor: 1
3
+ :patch: 0
4
4
  :major: 0
@@ -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-imdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
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