Module: Cisco::Common
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
Instance Method Summary collapse
- #clear_cmd ⇒ Object
- #clear_init ⇒ Object
- #enable(password, pwprompt = nil) ⇒ Object
- #extra_init(*args) ⇒ Object
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/cisco/common.rb', line 5 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/cisco/common.rb', line 5 def password @password end |
#prompt ⇒ Object
Returns the value of attribute prompt.
5 6 7 |
# File 'lib/cisco/common.rb', line 5 def prompt @prompt end |
Instance Method Details
#clear_cmd ⇒ Object
23 24 25 |
# File 'lib/cisco/common.rb', line 23 def clear_cmd @cmdbuf = [] end |
#clear_init ⇒ Object
19 20 21 |
# File 'lib/cisco/common.rb', line 19 def clear_init @extra_init = [] end |
#enable(password, pwprompt = nil) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/cisco/common.rb', line 7 def enable(password, pwprompt = nil) @pwprompt = pwprompt || @pwprompt old = @prompt cmd("enable", @pwprompt) cmd(password, old) end |
#extra_init(*args) ⇒ Object
14 15 16 17 |
# File 'lib/cisco/common.rb', line 14 def extra_init(*args) cmd(*args) @extra_init << @cmdbuf.pop end |