block-chainable 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ === 0.1.0 / 2008-04-08
2
+
3
+ * 1 major enhancement
4
+ * Methods with implicit blocks with be propagated correctly to parent scopes
5
+
1
6
  === 0.0.3 / 2008-03-27
2
7
 
3
8
  * 1 minor enhancement
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'need'
6
6
  require 'spec/rake/spectask'
7
7
  need{'./lib/block_chainable.rb'}
8
8
 
9
- Hoe.new('block-chainable', '0.0.3') do |p|
9
+ Hoe.new('block-chainable', '0.1.0') do |p|
10
10
  p.rubyforge_name = 'block-chainable'
11
11
  p.author = 'Drew Olson'
12
12
  p.email = 'olsonas@gmail.com'
@@ -6,9 +6,9 @@ module BlockChainable
6
6
  klass_instance.instance_variable_set("@__parent",eval("self",block))
7
7
 
8
8
  class << klass_instance
9
- def method_missing(name,*args)
9
+ def method_missing(name,*args,&block)
10
10
  if chain_respond_to?(name)
11
- @__parent.send(name,*args)
11
+ @__parent.send(name,*args,&block)
12
12
  else
13
13
  super
14
14
  end
@@ -20,7 +20,7 @@ module BlockChainable
20
20
  klass_instance
21
21
  end
22
22
 
23
- def inherited klass
23
+ def inherited(klass)
24
24
  klass.class_eval{include BlockChainable}
25
25
  end
26
26
  end
@@ -8,4 +8,8 @@ class Foo
8
8
  def is_foo?
9
9
  true
10
10
  end
11
+
12
+ def call_block &block
13
+ block.call
14
+ end
11
15
  end
@@ -44,4 +44,12 @@ class TestBlockChainable < Test::Unit::TestCase
44
44
  assert is_baz?
45
45
  end
46
46
  end
47
+
48
+ def test_method_with_block_in_parent_scope
49
+ Foo do
50
+ Bar do
51
+ assert(call_block{true})
52
+ end
53
+ end
54
+ end
47
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: block-chainable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Olson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-27 00:00:00 -07:00
12
+ date: 2008-04-10 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements: []
89
89
 
90
90
  rubyforge_project: block-chainable
91
- rubygems_version: 1.0.1
91
+ rubygems_version: 1.1.0
92
92
  signing_key:
93
93
  specification_version: 2
94
94
  summary: BlockChainable is a module to aid in the creation of Domain Specific Languages using block structure