Sha256: a8c7a9fe55115baa9cbffd29cb63c478356ac31ece1fc9fc0263f3e1a3903143
Contents?: true
Size: 604 Bytes
Versions: 27
Compression:
Stored size: 604 Bytes
Contents
module Spreedly class Gateway < Model field :gateway_type, :state, :name attr_reader :credentials def initialize(xml_doc) super init_credentials(xml_doc) end def self.new_list_from(xml_doc) gateways = xml_doc.xpath('.//gateways/gateway') gateways.map do |each| self.new(each) end end private def init_credentials(xml_doc) @credentials = {} xml_doc.xpath('.//credentials/credential').each do |each| @credentials[each.at_xpath('.//name').text] = each.at_xpath('.//value').text end end end end
Version data entries
27 entries across 27 versions & 1 rubygems