Class: RubyMas

Inherits:
Object
  • Object
show all
Defined in:
lib/rubymas.rb

Instance Method Summary collapse

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_connectObject



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_reportObject



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