why_not 0.0.3 → 0.0.4

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 (4) hide show
  1. data/README.rdoc +1 -1
  2. data/Rakefile +1 -1
  3. data/lib/why_not.rb +4 -4
  4. metadata +12 -5
@@ -32,4 +32,4 @@ In general
32
32
  == Dependencies
33
33
 
34
34
  * rubygems
35
- * meta_programming
35
+ * meta_programming (= 0.2)
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ spec = Gem::Specification.new do |s|
13
13
  s.description = 'not_empty?, not_blank?, not_defined? ... why not? This is Ruby, come on.'
14
14
  s.summary = 'Comprehensive negation for all Ruby predicate methods.'
15
15
 
16
- s.add_dependency('meta_programming', '>= 0.0.6')
16
+ s.add_dependency('meta_programming', '>=0.2.0', '< 0.3.0')
17
17
 
18
18
  exclude_folders = '' # 'spec/rails/{doc,lib,log,nbproject,tmp,vendor,test}'
19
19
  exclude_files = [] # FileList['**/*.log'] + FileList[exclude_folders+'/**/*'] + FileList[exclude_folders]
@@ -1,18 +1,18 @@
1
1
  require 'meta_programming'
2
2
 
3
3
  class Object
4
- define_ghost_method(/^not_.+\?$/) do |object, symbol, *args|
4
+ define_ghost_method(/^not_.+\?$/) do |symbol, *args|
5
5
  symbol.to_s =~ /^not_(.+\?)$/
6
6
  regular_method = $1.to_sym
7
- !object.__send__(regular_method, *args)
7
+ !__send__(regular_method, *args)
8
8
  end
9
- define_ghost_method(/^is(nt|_not)_.+\?$/) do |object, symbol, *args|
9
+ define_ghost_method(/^is(nt|_not)_.+\?$/) do |symbol, *args|
10
10
  (method = symbol.to_s) =~ /^is(nt|_not)_/
11
11
  regular_method = case $1
12
12
  when 'nt' then method.gsub(/^isnt_/, 'is_').to_sym
13
13
  when '_not' then method.gsub(/^is_not_/, 'is_').to_sym
14
14
  end
15
- !object.__send__(regular_method, *args)
15
+ !__send__(regular_method, *args)
16
16
  end
17
17
  end
18
18
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeff Patmon
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-01 00:00:00 -07:00
17
+ date: 2010-05-02 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -26,9 +26,16 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  segments:
28
28
  - 0
29
+ - 2
29
30
  - 0
30
- - 6
31
- version: 0.0.6
31
+ version: 0.2.0
32
+ - - <
33
+ - !ruby/object:Gem::Version
34
+ segments:
35
+ - 0
36
+ - 3
37
+ - 0
38
+ version: 0.3.0
32
39
  type: :runtime
33
40
  version_requirements: *id001
34
41
  description: not_empty?, not_blank?, not_defined? ... why not? This is Ruby, come on.