class Avaya::DirList

Attributes

directory[R]

Public Class Methods

get() click to toggle source
# File lib/avaya/dir_list.rb, line 9
def self.get
  dir_list = self.new
  dir_list.get

end
new() click to toggle source
# File lib/avaya/dir_list.rb, line 5
def initialize
  @directory = Avaya::TFTP.read(:dir_list)
end

Public Instance Methods

get() click to toggle source
# File lib/avaya/dir_list.rb, line 15
def get
  list= []
  directory.each do |row|
    row = row.split(",")
    list << {
        name:   row[0],
        number: row[1]
    }
  end
  list
end