mushin 0.0.0.pre41 → 0.0.0.pre42
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.
- checksums.yaml +4 -4
- data/lib/mushin/base.rb +39 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140ebc209677627d421cce2632c86464aa03fd77
|
4
|
+
data.tar.gz: 9e5e6c1ec67c813b008c26afb9583b2c80916006
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 533659e62a9799767a0e06b4759552a18433eae81983a88750dece1ef19f48236ce9dfbd1abbb526509f4b6dec36329644ee14fff2c0d420fe01188848cbf32b
|
7
|
+
data.tar.gz: a2ce8ceb297ea29d0bbce6e7ce5bba8d72d109113c27b5d9d58baa4dd8f55e74f52f1c72bd09386aaa75deddb18b9d90eb996569b3c20c3a983c0c21a448305b
|
data/lib/mushin/base.rb
CHANGED
@@ -69,10 +69,11 @@ module Mushin
|
|
69
69
|
mod.send(:include, self)
|
70
70
|
end
|
71
71
|
|
72
|
+
attr_accessor :statment_construct, :activation_construct
|
72
73
|
def self.build context_construct, statment_construct, activation_construct
|
73
74
|
@statment_construct = statment_construct
|
74
75
|
@activation_construct = activation_construct
|
75
|
-
|
76
|
+
@@contexts = []
|
76
77
|
def context title, &block
|
77
78
|
@context = Mushin::DSL::Context.new title
|
78
79
|
def statment statment=[], &block
|
@@ -84,7 +85,9 @@ module Mushin
|
|
84
85
|
end
|
85
86
|
#Mushin::DSL::Notebook.class_eval do
|
86
87
|
Mushin::DSL::Notebook.instance_eval do
|
87
|
-
|
88
|
+
alias_method @activation_construct, :activation
|
89
|
+
#p activation_construct
|
90
|
+
#alias activation_construct :activation
|
88
91
|
end
|
89
92
|
yield
|
90
93
|
@context.statments << @statment
|
@@ -95,12 +98,45 @@ module Mushin
|
|
95
98
|
alias_method @statment_construct, :statment
|
96
99
|
end
|
97
100
|
yield
|
98
|
-
|
101
|
+
@@contexts << @context
|
99
102
|
@context = nil
|
100
103
|
end
|
101
104
|
alias_method context_construct, :context
|
105
|
+
#alias context_construct :context
|
102
106
|
end
|
107
|
+
=begin
|
108
|
+
def self.build context_construct, statment_construct, activation_construct
|
109
|
+
@@statment_construct = statment_construct
|
110
|
+
@@activation_construct = activation_construct
|
111
|
+
@@contexts = []
|
112
|
+
def context title, &block
|
113
|
+
@context = Mushin::DSL::Context.new title
|
114
|
+
def statment statment=[], &block
|
115
|
+
@statment = Mushin::DSL::Statment.new statment
|
103
116
|
|
117
|
+
def activation name, opts={}, params={}
|
118
|
+
@activation = Mushin::DSL::Activation.new name, opts, params
|
119
|
+
@statment.activations << @activation
|
120
|
+
end
|
121
|
+
#Mushin::DSL::Notebook.class_eval do
|
122
|
+
Mushin::DSL::Notebook.instance_eval do
|
123
|
+
alias_method @@activation_construct, :activation
|
124
|
+
end
|
125
|
+
yield
|
126
|
+
@context.statments << @statment
|
127
|
+
@statment = nil
|
128
|
+
end
|
129
|
+
#Mushin::DSL::Notebook.class_eval do
|
130
|
+
Mushin::DSL::Notebook.instance_eval do
|
131
|
+
alias_method @@statment_construct, :statment
|
132
|
+
end
|
133
|
+
yield
|
134
|
+
@@contexts << @context
|
135
|
+
@context = nil
|
136
|
+
end
|
137
|
+
alias_method context_construct, :context
|
138
|
+
end
|
139
|
+
=end
|
104
140
|
def self.find activity_context, activity_statment
|
105
141
|
@@middlewares = []
|
106
142
|
@@contexts.each do |current_context|
|