Sha256: 2924ee31b644f8f55646ee7e31a36c6cabbc140be8397e470e03869abc763990
Contents?: true
Size: 779 Bytes
Versions: 4
Compression:
Stored size: 779 Bytes
Contents
module Fog module Parsers module Terremark class GetNodeServices < Base def reset @node_service = {} @response = { 'NodeServices' => [] } end def end_element(name) case name when 'Description', 'Href', 'Name', 'IpAddress' @node_service[name] = value when 'Enabled' if value == 'true' @node_service[name] = true else @node_service[name] = false end when 'Id', 'Port' @node_service[name] = value.to_i when 'NodeService' @response['NodeServices'] << @node_service @node_service = {} end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems