Method: Atlantis::Portal::TestFlightService#list_groups

Defined in:
lib/Atlantis/portal/testflight/testflightservice.rb

#list_groupsObject



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/Atlantis/portal/testflight/testflightservice.rb', line 113

def list_groups
  get('dashboard/team')

  lists = []

  agent.page.parser.css("nav.vert-nav li a").each do |row|

    unless (row['href'].nil?)
      url = row['href'].split('/')

      #puts url.length

      if (url.length >= 5) && (url[4].is_i?)
        #puts url[3]

        list = Group.new
        list.id = url[4]
        list.name = row.css('> text()').text.strip
        list.count = row.css('span').text.strip

        lists << list
      end

    end
  end

  lists
end