Class: MuSL::Maker::Steps

Inherits:
Block
  • Object
show all
Defined in:
lib/mu/maker.rb

Instance Attribute Summary

Attributes inherited from Block

#scenario

Instance Method Summary collapse

Methods inherited from Block

#comment, #initialize

Constructor Details

This class inherits a constructor from MuSL::Maker::Block

Instance Method Details

#client_receive(name, xport, kvs = {}) ⇒ Object



161
162
163
164
165
166
# File 'lib/mu/maker.rb', line 161

def client_receive name, xport, kvs={}
    decl = name + ' = ' + xport + '.client_receive' + scenario.attrs(kvs)
    scenario.block decl + ' {', '}' do
        yield Receive.new(scenario)
    end
end

#client_send(name, xport, kvs = {}) ⇒ Object



147
148
149
150
151
152
# File 'lib/mu/maker.rb', line 147

def client_send name, xport, kvs={}
    decl = name + ' = ' + xport + '.client_send' + scenario.attrs(kvs)
    scenario.block decl + ' {', '}' do
        yield Send.new(scenario)
    end            
end

#server_receive(name, xport, kvs = {}) ⇒ Object



168
169
170
171
172
173
# File 'lib/mu/maker.rb', line 168

def server_receive name, xport, kvs={}
    decl = name + ' = ' + xport + '.server_receive' + scenario.attrs(kvs)
    scenario.block decl + ' {', '}' do
        yield Receive.new(scenario)
    end
end

#server_send(name, xport, kvs = {}) ⇒ Object



154
155
156
157
158
159
# File 'lib/mu/maker.rb', line 154

def server_send name, xport, kvs={}
    decl = name + ' = ' + xport + '.server_send' + scenario.attrs(kvs)
    scenario.block decl + ' {', '}' do
        yield Send.new(scenario)
    end
end

#xport(name, klass, kvs) ⇒ Object



142
143
144
145
# File 'lib/mu/maker.rb', line 142

def xport name, klass, kvs
    scenario.line(name + ' = ' + klass + scenario.attrs(kvs));
    scenario.line;            
end