Class: Avaya::HuntList

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHuntList



5
6
7
# File 'lib/avaya/hunt_list.rb', line 5

def initialize
  @directory = Avaya::TFTP.read(:hunt_list)
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



3
4
5
# File 'lib/avaya/hunt_list.rb', line 3

def directory
  @directory
end

Class Method Details

.getObject



9
10
11
12
# File 'lib/avaya/hunt_list.rb', line 9

def self.get
  hunt_list = self.new
  hunt_list.get
end

Instance Method Details

#getObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/avaya/hunt_list.rb', line 14

def get
  list= []
  directory.each do |row|
    row = row.split(",")
    list << {
        name:        row[0],
        ext:         row[1],
        queue:       row[2],
        voice_mails: row[7],
        hunt_id:     row[9]
    }
  end

  list

end