Groups are RocketChat's private rooms.
N.B. groups.list, contrary to the other lists can only be used for listing
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
groups = session.groups.list(offset: 40)