Class: FluentCommandBuilder::Netsh::V2008::SetRule

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/fluent_command_builder/command_builders/netsh_2008.rb

Instance Method Summary collapse

Methods inherited from CommandBase

#execute!, #to_s

Constructor Details

#initialize(builder) ⇒ SetRule

Returns a new instance of SetRule.



179
180
181
182
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 179

def initialize(builder)
  super builder
  @builder.append ' set rule'
end

Instance Method Details

#dir(direction) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


188
189
190
191
192
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 188

def dir(direction)
  @builder.append " dir=#{@builder.format direction}"
  yield @builder if block_given?
  self
end

#group(group_name) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


183
184
185
186
187
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 183

def group(group_name)
  @builder.append " group=#{@builder.format group_name}"
  yield @builder if block_given?
  self
end

#local_ip(address) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


208
209
210
211
212
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 208

def local_ip(address)
  @builder.append " localIp=#{@builder.format address, ','}"
  yield @builder if block_given?
  self
end

#local_port(port) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


218
219
220
221
222
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 218

def local_port(port)
  @builder.append " localPort=#{@builder.format port, ','}"
  yield @builder if block_given?
  self
end

#newObject



233
234
235
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 233

def new
  New.new @builder
end

#profile(profile) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


193
194
195
196
197
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 193

def profile(profile)
  @builder.append " profile=#{@builder.format profile}"
  yield @builder if block_given?
  self
end

#program(path) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


198
199
200
201
202
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 198

def program(path)
  @builder.append " program=#{@builder.format path}"
  yield @builder if block_given?
  self
end

#protocol(protocol) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


228
229
230
231
232
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 228

def protocol(protocol)
  @builder.append " protocol=#{@builder.format protocol}"
  yield @builder if block_given?
  self
end

#remote_ip(address) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


213
214
215
216
217
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 213

def remote_ip(address)
  @builder.append " remoteIp=#{@builder.format address, ','}"
  yield @builder if block_given?
  self
end

#remote_port(port) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


223
224
225
226
227
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 223

def remote_port(port)
  @builder.append " remotePort=#{@builder.format port, ','}"
  yield @builder if block_given?
  self
end

#service(service_short_name) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


203
204
205
206
207
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 203

def service(service_short_name)
  @builder.append " service=#{@builder.format service_short_name}"
  yield @builder if block_given?
  self
end