Class: Nmunch::Subscribers::Stdout
- Defined in:
- lib/nmunch/subscribers/stdout.rb
Overview
Public: Node subscriber to output node details to STDOUT
This subscriber is default and will always be registered
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#process(node) ⇒ Object
Public: Process a new node.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Nmunch::Subscribers::Base
Instance Method Details
#process(node) ⇒ Object
Public: Process a new node
node - An instance of Nmunch::Node
Prints node information to STDOUT
Returns nothing
16 17 18 19 20 |
# File 'lib/nmunch/subscribers/stdout.rb', line 16 def process(node) output = " #{node.ip_address}\t\t#{node.mac_address}" output << "\t#{Nmunch::MacOuiLookup.instance.lookup(node.mac_address)}" unless .include?("no-prefix-lookup") puts Paint[output, :green] end |