Class: Mushin::Test::Sample::Ext
- Inherits:
-
Object
- Object
- Mushin::Test::Sample::Ext
- Defined in:
- lib/mushin/test_helper.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(ext, opts = {}, params = {}) ⇒ Ext
constructor
A new instance of Ext.
Constructor Details
#initialize(ext, opts = {}, params = {}) ⇒ Ext
Returns a new instance of Ext.
6 7 8 9 10 |
# File 'lib/mushin/test_helper.rb', line 6 def initialize(ext, opts = {}, params= {}) @ext = ext @opts = opts @params = params end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/mushin/test_helper.rb', line 12 def call(env) env ||= Hash.new #if env.nil? $log.info "-----------------------------------------------------------------------" $log.info "Ext: #{self} is called with the following options: #{@opts} & params: #{@params}; and env: #{env}" $log.info "-----------------------------------------------------------------------" # Inbound maniuplation env[:events] ||= [] $log.info env[:var] = "#{self} new_value_inbound" $log.info env[:events] << "#{self} new_event_inbound" @ext.call(env) #Outbound maniuplation $log.info env[:var] = "#{self} new_value_outbound" $log.info env[:events] << "#{self} new_event_outbound" end |