Class: RubyMas
- Inherits:
-
Object
- Object
- RubyMas
- Defined in:
- lib/rubymas.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ RubyMas
constructor
A new instance of RubyMas.
- #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
#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 20 21 |
# File 'lib/rubymas.rb', line 14 def workorder_report connect telnet.cmd("7") telnet.cmd("2") telnet.cmd("WOH_DUMP") telnet.cmd("") telnet.cmd("*END") end |