Class: YadisServiceManager
- Inherits:
-
Object
- Object
- YadisServiceManager
- Defined in:
- lib/yadis/manager.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#session_key ⇒ Object
readonly
Returns the value of attribute session_key.
-
#starting_url ⇒ Object
readonly
Returns the value of attribute starting_url.
-
#yadis_url ⇒ Object
readonly
Returns the value of attribute yadis_url.
Instance Method Summary collapse
- #for_url?(url) ⇒ Boolean
-
#initialize(starting_url, yadis_url, services) ⇒ YadisServiceManager
constructor
A new instance of YadisServiceManager.
- #length ⇒ Object
- #next ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize(starting_url, yadis_url, services) ⇒ YadisServiceManager
Returns a new instance of YadisServiceManager.
7 8 9 10 11 12 |
# File 'lib/yadis/manager.rb', line 7 def initialize(starting_url, yadis_url, services) @starting_url = starting_url @yadis_url = yadis_url @services = services @current = nil end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
5 6 7 |
# File 'lib/yadis/manager.rb', line 5 def current @current end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
5 6 7 |
# File 'lib/yadis/manager.rb', line 5 def services @services end |
#session_key ⇒ Object (readonly)
Returns the value of attribute session_key.
5 6 7 |
# File 'lib/yadis/manager.rb', line 5 def session_key @session_key end |
#starting_url ⇒ Object (readonly)
Returns the value of attribute starting_url.
5 6 7 |
# File 'lib/yadis/manager.rb', line 5 def starting_url @starting_url end |
#yadis_url ⇒ Object (readonly)
Returns the value of attribute yadis_url.
5 6 7 |
# File 'lib/yadis/manager.rb', line 5 def yadis_url @yadis_url end |
Instance Method Details
#for_url?(url) ⇒ Boolean
18 19 20 |
# File 'lib/yadis/manager.rb', line 18 def for_url?(url) url == @starting_url or url == @yadis_url end |
#length ⇒ Object
26 27 28 |
# File 'lib/yadis/manager.rb', line 26 def length @services.length end |
#next ⇒ Object
14 15 16 |
# File 'lib/yadis/manager.rb', line 14 def next @current = @services.shift end |
#started? ⇒ Boolean
22 23 24 |
# File 'lib/yadis/manager.rb', line 22 def started? not @current.nil? end |