Class: Cisco::Interface
- Defined in:
- lib/netutils/cli/cisco/interface.rb
Constant Summary
Constants inherited from FSM
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(sw) ⇒ Interface
constructor
A new instance of Interface.
Methods inherited from Parser
Methods inherited from FSM
#add, #cb, #changeto, #state_name
Constructor Details
#initialize(sw) ⇒ Interface
Returns a new instance of Interface.
10 11 12 13 14 15 16 17 18 |
# File 'lib/netutils/cli/cisco/interface.rb', line 10 def initialize(sw) super() add('Init', :init) add('Name', :name, /^ +Model: +(.+)$/) add('Model', :model, /^ +Type: +(.+)$/) add('Type', :type) add('Speed', :speed, /^ +Duplex: +(.+)$/) @sw = sw end |
Instance Method Details
#cmd ⇒ Object
6 7 8 |
# File 'lib/netutils/cli/cisco/interface.rb', line 6 def cmd return 'show interfaces capabilities' end |