Class: ServiceEndpoint
- Inherits:
-
Object
- Object
- ServiceEndpoint
- Defined in:
- lib/yadis/service.rb
Overview
Class representing an XRD Service element.
Instance Attribute Summary collapse
-
#element ⇒ Object
Returns the value of attribute element.
-
#service_types ⇒ Object
Returns the value of attribute service_types.
-
#uri ⇒ Object
Returns the value of attribute uri.
-
#yadis ⇒ Object
Returns the value of attribute yadis.
-
#yadis_uri ⇒ Object
Returns the value of attribute yadis_uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize ⇒ ServiceEndpoint
constructor
A new instance of ServiceEndpoint.
- #match_type_uris(type_uris) ⇒ Object
Constructor Details
#initialize ⇒ ServiceEndpoint
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
#element ⇒ Object
Returns the value of attribute element.
4 5 6 |
# File 'lib/yadis/service.rb', line 4 def element @element end |
#service_types ⇒ Object
Returns the value of attribute service_types.
4 5 6 |
# File 'lib/yadis/service.rb', line 4 def service_types @service_types end |
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/yadis/service.rb', line 4 def uri @uri end |
#yadis ⇒ Object
Returns the value of attribute yadis.
4 5 6 |
# File 'lib/yadis/service.rb', line 4 def yadis @yadis end |
#yadis_uri ⇒ Object
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 |