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

#inventory_reportObject



21
22
23
24
25
26
# File 'lib/rubymas.rb', line 21

def inventory_report
  connect
  run_report
  telnet.cmd("INVDUMP")
  finish
end

#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
# File 'lib/rubymas.rb', line 14

def workorder_report
  connect
  run_report
  telnet.cmd("WOH_DUMP")
  finish
end