meta_programming 0.2.1 → 0.2.2

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 (2) hide show
  1. data/lib/meta_programming/object.rb +2 -2
  2. metadata +3 -3
@@ -60,7 +60,7 @@ module MetaProgramming
60
60
  end
61
61
 
62
62
  def define_chained_method(method_name, ext, &block)
63
- raise 'Must have block' unless block_given?
63
+ raise 'Must have a block defining the method body' unless block_given?
64
64
  with, without = Helpers.compose_chaining_symbols(method_name, ext)
65
65
  define_method(with, block)
66
66
  safe_alias_method_chain(method_name.to_sym, ext.to_sym)
@@ -74,7 +74,7 @@ module MetaProgramming
74
74
  def define_ghost_method(matcher, &block)
75
75
  raise "Must have a block" unless block_given?
76
76
  raise ArgumentError, "Matcher argument must be either a 'string', :symbol, /regexp/ or proc" unless (matcher.nil? || [String, Symbol, Regexp, Proc].any?{|c| matcher.is_a?(c)})
77
- uniq_ext = "#{self.name.gsub(/^.+>::/,'')}_#{matcher.class.name.gsub(/^.+>::/,'')}#{matcher.hash.abs.to_s}"
77
+ uniq_ext = "#{self.name.gsub(/.+::/,'')}_#{matcher.class.name.gsub(/.+::/,'')}#{matcher.hash.abs.to_s}"
78
78
  _ghost_method_handler = "_ghost_method_handler_#{uniq_ext}".to_sym
79
79
  _ghost_method_matcher = "_ghost_method_matcher_#{uniq_ext}".to_sym
80
80
  define_method(_ghost_method_handler, block)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
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-21 00:00:00 -07:00
17
+ date: 2010-05-28 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20