Class: ServiceEndpoint

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

Overview

Class representing an XRD Service element.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServiceEndpoint

Returns a new instance of ServiceEndpoint.



6
7
8
9
10
11
12
# File 'lib/yadis/service.rb', line 6

def initialize
  @service_types = []
  @uri = nil
  @yadis_uri = nil
  @element = nil
  @yadis_uri = nil
end

Instance Attribute Details

#elementObject

Returns the value of attribute element.



4
5
6
# File 'lib/yadis/service.rb', line 4

def element
  @element
end

#service_typesObject

Returns the value of attribute service_types.



4
5
6
# File 'lib/yadis/service.rb', line 4

def service_types
  @service_types
end

#uriObject

Returns the value of attribute uri.



4
5
6
# File 'lib/yadis/service.rb', line 4

def uri
  @uri
end

#yadisObject

Returns the value of attribute yadis.



4
5
6
# File 'lib/yadis/service.rb', line 4

def yadis
  @yadis
end

#yadis_uriObject

Returns the value of attribute yadis_uri.



4
5
6
# File 'lib/yadis/service.rb', line 4

def yadis_uri
  @yadis_uri
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/yadis/service.rb', line 18

def ==(other)
  return self.instance_variables == other.instance_variables
end

#match_type_uris(type_uris) ⇒ Object



14
15
16
# File 'lib/yadis/service.rb', line 14

def match_type_uris(type_uris)
  type_uris.find_all {|t| @service_types.member?(t)}
end