Class: FluentCommandBuilder::Netsh::V2008::AddRule

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, rule_name, direction, action) ⇒ AddRule

Returns a new instance of AddRule.



47
48
49
50
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 47

def initialize(builder, rule_name, direction, action)
  super builder
  @builder.append " add rule name=#{@builder.format rule_name} dir=#{@builder.format direction} action=#{@builder.format action}"
end

Instance Method Details

#description(rule_description) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


61
62
63
64
65
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 61

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

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

Yields:

  • (@builder)


116
117
118
119
120
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 116

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

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

Yields:

  • (@builder)


66
67
68
69
70
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 66

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

#interface_type(type) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


101
102
103
104
105
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 101

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

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

Yields:

  • (@builder)


76
77
78
79
80
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 76

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

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

Yields:

  • (@builder)


86
87
88
89
90
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 86

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

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

Yields:

  • (@builder)


71
72
73
74
75
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 71

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

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

Yields:

  • (@builder)


51
52
53
54
55
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 51

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

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

Yields:

  • (@builder)


96
97
98
99
100
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 96

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

#remote_computer_group(sddl_string) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


106
107
108
109
110
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 106

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

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

Yields:

  • (@builder)


81
82
83
84
85
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 81

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

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

Yields:

  • (@builder)


91
92
93
94
95
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 91

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

#remote_user_group(sddl_string) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


111
112
113
114
115
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 111

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

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

Yields:

  • (@builder)


121
122
123
124
125
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 121

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

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

Yields:

  • (@builder)


56
57
58
59
60
# File 'lib/fluent_command_builder/command_builders/netsh_2008.rb', line 56

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