Class: OpenID::Yadis::CompoundFilter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subfilters) ⇒ CompoundFilter

Create a new filter that applies a set of filters to an endpoint and collects their results.



121
122
123
# File 'lib/openid/yadis/filters.rb', line 121

def initialize(subfilters)
  @subfilters = subfilters
end

Instance Attribute Details

#subfiltersObject (readonly)

Returns the value of attribute subfilters.



117
118
119
# File 'lib/openid/yadis/filters.rb', line 117

def subfilters
  @subfilters
end

Instance Method Details

#get_service_endpoints(yadis_url, service_element) ⇒ Object

Generate all endpoint objects for all of the subfilters of this filter and return their concatenation.



127
128
129
130
131
132
133
# File 'lib/openid/yadis/filters.rb', line 127

def get_service_endpoints(yadis_url, service_element)
  endpoints = []
  @subfilters.each { |subfilter|
    endpoints += subfilter.get_service_endpoints(yadis_url, service_element)
  }
  return endpoints
end