Class: Zimbra::DomainService::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/zimbra/domain.rb

Class Method Summary collapse

Class Method Details

.domain_response(node) ⇒ Object



129
130
131
132
133
134
# File 'lib/zimbra/domain.rb', line 129

def domain_response(node)
  id = (node/'@id').to_s
  name = (node/'@name').to_s
  acls = Zimbra::ACL.read(node)
  Zimbra::Domain.new(id, name, acls) 
end

.get_all_response(response) ⇒ Object



123
124
125
126
127
# File 'lib/zimbra/domain.rb', line 123

def get_all_response(response)
  (response/"//n2:domain").map do |node|
    domain_response(node)
  end
end