Class: RubyMas
- Inherits:
-
Object
- Object
- RubyMas
- Defined in:
- lib/rubymas.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ RubyMas
constructor
A new instance of RubyMas.
- #inventory_report ⇒ Object
- #test_connect ⇒ Object
- #workorder_report ⇒ Object
Constructor Details
#initialize(hash) ⇒ RubyMas
Returns a new instance of RubyMas.
4 5 6 |
# File 'lib/rubymas.rb', line 4 def initialize(hash) @connection = hash end |
Instance Method Details
#inventory_report ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rubymas.rb', line 21 def inventory_report connect run_report telnet.cmd("HP_DUMP3") telnet.cmd("p") telnet.cmd("fil") telnet.cmd("/usr/common") telnet.cmd("invdump.csv") telnet.cmd("3") telnet.cmd("") telnet.cmd("Y") telnet.cmd("") telnet.cmd("") telnet.cmd("") finish end |
#test_connect ⇒ Object
8 9 10 11 12 |
# File 'lib/rubymas.rb', line 8 def test_connect telnet.cmd(@connection[:user]) {|c| print c} telnet.cmd(@connection[:password]) {|c| print c} telnet.close end |
#workorder_report ⇒ Object
14 15 16 17 18 19 |
# File 'lib/rubymas.rb', line 14 def workorder_report connect run_report telnet.cmd("WOH_DUMP") finish end |