partialclass 0.1.0 → 0.2.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.
@@ -12,15 +12,15 @@ class Class
12
12
  unless Class.respond_to? :define_singleton_method
13
13
  def define_singleton_method name, &block
14
14
  metaclass = class << self; self; end
15
- metaclass.define_method(:name, &block)
15
+ metaclass.define_method(name, &block)
16
16
  end
17
17
  end
18
18
 
19
19
  private
20
20
  def _specialize(parent, *prep)
21
21
  Class.new(parent) do
22
- define_method(:initialize) { |*args| super(*(prep + args)) }
23
- define_singleton_method(:specialize) { |*args| _specialize(parent, *(prep+args)) }
22
+ define_singleton_method(:new) { |*args| super(*(prep + args)) }
23
+ define_singleton_method(:specialize) { |*args| _specialize(parent, *(prep+args)) }
24
24
  end
25
25
  end
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module PartialClass
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: partialclass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-03 00:00:00.000000000 Z
12
+ date: 2013-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler