Class: Watobo::Interceptor::Carver
- Inherits:
-
Object
- Object
- Watobo::Interceptor::Carver
show all
- Defined in:
- lib/watobo/core/intercept_carver.rb
Class Method Summary
collapse
Class Method Details
.add_rule(rule) ⇒ Object
162
163
164
|
# File 'lib/watobo/core/intercept_carver.rb', line 162
def self.add_rule(rule)
@rules << rule if rule.respond_to? :apply
end
|
.clear_rules ⇒ Object
166
167
168
|
# File 'lib/watobo/core/intercept_carver.rb', line 166
def self.clear_rules
@rules.clear
end
|
.rules ⇒ Object
145
146
147
|
# File 'lib/watobo/core/intercept_carver.rb', line 145
def self.rules
@rules
end
|
.set_carving_rules(rules) ⇒ Object
158
159
160
|
# File 'lib/watobo/core/intercept_carver.rb', line 158
def self.set_carving_rules(rules)
@rules = rules
end
|
.shape(response, flags) ⇒ Object
149
150
151
152
153
154
155
156
|
# File 'lib/watobo/core/intercept_carver.rb', line 149
def self.shape(response, flags)
puts "Shape, Baby shape, ..."
@rules.each do |r|
res = r.apply( response, flags )
puts "#{r.action_name} (#{r.action.class}) >> #{res.class}"
end
end
|