Class: FluentCommandBuilder::Netsh::V61::AddRule

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

Instance Method Summary collapse

Methods inherited from CommandBase

#configure!, #execute!, #to_s

Constructor Details

#initialize(underlying_builder, rule_name, direction, action) ⇒ AddRule

Returns a new instance of AddRule.



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

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

Instance Method Details

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


131
132
133
134
135
# File 'lib/fluent_command_builder/command_builders/netsh_61.rb', line 131

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


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

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

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

Yields:

  • (@b)


126
127
128
129
130
# File 'lib/fluent_command_builder/command_builders/netsh_61.rb', line 126

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

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

Yields:

  • (@b)


136
137
138
139
140
# File 'lib/fluent_command_builder/command_builders/netsh_61.rb', line 136

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

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

Yields:

  • (@b)


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

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