Class: Avaya::UserList
- Inherits:
-
Object
- Object
- Avaya::UserList
- Defined in:
- lib/avaya/user_list.rb
Instance Attribute Summary collapse
-
#user_list ⇒ Object
readonly
Returns the value of attribute user_list.
Class Method Summary collapse
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(list_id = "") ⇒ UserList
constructor
A new instance of UserList.
Constructor Details
Instance Attribute Details
#user_list ⇒ Object (readonly)
Returns the value of attribute user_list.
3 4 5 |
# File 'lib/avaya/user_list.rb', line 3 def user_list @user_list end |
Class Method Details
.get(list_id = "") ⇒ Object
9 10 11 12 13 |
# File 'lib/avaya/user_list.rb', line 9 def self.get(list_id = "") hunt_list = self.new(list_id) hunt_list.get end |
Instance Method Details
#get ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/avaya/user_list.rb', line 15 def get list= [] user_list.each do |row| row = row.split(",") new_row = { name: row[0], ext: row[1], full_name: row[2], user_id: row.last } unless @list_id == "" or @list_id == "2" new_row.merge! ex_directory: (row[3] =="1") new_row.merge! active: (row[4] == "1") end list << new_row end list end |