Class: FluentCommandBuilder::Netsh::V2008::AddRule
- Inherits:
-
CommandBase
- Object
- CommandBase
- FluentCommandBuilder::Netsh::V2008::AddRule
- Defined in:
- lib/fluent_command_builder/command_builders/netsh_2008.rb
Instance Method Summary collapse
- #description(rule_description) {|@builder| ... } ⇒ Object
- #edge(edge) {|@builder| ... } ⇒ Object
- #enable(enable) {|@builder| ... } ⇒ Object
-
#initialize(builder, rule_name, direction, action) ⇒ AddRule
constructor
A new instance of AddRule.
- #interface_type(type) {|@builder| ... } ⇒ Object
- #local_ip(address) {|@builder| ... } ⇒ Object
- #local_port(port) {|@builder| ... } ⇒ Object
- #profile(profile) {|@builder| ... } ⇒ Object
- #program(path) {|@builder| ... } ⇒ Object
- #protocol(protocol) {|@builder| ... } ⇒ Object
- #remote_computer_group(sddl_string) {|@builder| ... } ⇒ Object
- #remote_ip(address) {|@builder| ... } ⇒ Object
- #remote_port(port) {|@builder| ... } ⇒ Object
- #remote_user_group(sddl_string) {|@builder| ... } ⇒ Object
- #security(security) {|@builder| ... } ⇒ Object
- #service(service_short_name) {|@builder| ... } ⇒ Object
Methods inherited from CommandBase
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |