notahat-machinist 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sham.rb +10 -0
- 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.
|
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-
|
12
|
+
date: 2008-12-22 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|