Method: IPAccess::Set#show

Defined in:
lib/ipaccess/ip_access_set.rb

#show(reasons = false) ⇒ Object

This method shows an access set in a human readable form.



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/ipaccess/ip_access_set.rb', line 192

def show(reasons=false)
  r = ""
  unless @input.empty?
    r = ".=========================================.\n"   +
        ". Rules for incoming traffic:\n\n"               +
        @input.show(reasons)
    r += "\n" if @output.empty?
  end
  unless @output.empty?
    r += "\n" unless @input.empty?
    r +=  ".=========================================.\n" +
          ". Rules for outgoing traffic:\n\n"             +
          @output.show(reasons) + "\n"
  end
  return r
end