Class: Soap::Parser::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/soap/parser/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_namespaces, node) ⇒ Service

Returns a new instance of Service.



10
11
12
13
# File 'lib/soap/parser/service.rb', line 10

def initialize(_namespaces, node)
  @node = node
  @hash = {}
end

Instance Attribute Details

#hashObject

Returns the value of attribute hash.



7
8
9
# File 'lib/soap/parser/service.rb', line 7

def hash
  @hash
end

#nodeObject (readonly)

Returns the value of attribute node.



8
9
10
# File 'lib/soap/parser/service.rb', line 8

def node
  @node
end

Instance Method Details

#parseObject



15
16
17
# File 'lib/soap/parser/service.rb', line 15

def parse
  parse_service
end

#parse_serviceObject



19
20
21
22
23
24
# File 'lib/soap/parser/service.rb', line 19

def parse_service
  address = node.first.at_xpath("./wsdl:port/soap:address")
  @hash = {
    base_endpoint: address["location"]
  }
end