notahat-machinist 0.1.6 → 0.1.7

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/sham.rb +10 -0
  2. metadata +2 -2
data/lib/sham.rb CHANGED
@@ -24,6 +24,16 @@ class Sham
24
24
  @@shams.values.each(&:reset)
25
25
  end
26
26
 
27
+ def self.define(&block)
28
+ definer = Object.new
29
+ class << definer
30
+ def method_missing(*args, &block)
31
+ Sham.send(*args, &block)
32
+ end
33
+ end
34
+ definer.instance_eval(&block)
35
+ end
36
+
27
37
  def initialize(name, options = {}, &block)
28
38
  @name = name
29
39
  @generator = block
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notahat-machinist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Yandell
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-15 00:00:00 -08:00
12
+ date: 2008-12-22 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15