Class: Flipper::Adapters::Poll
- Inherits:
-
Object
- Object
- Flipper::Adapters::Poll
- Extended by:
- Forwardable
- Includes:
- Flipper::Adapter
- Defined in:
- lib/flipper/adapters/poll.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#poller ⇒ Object
readonly
Returns the value of attribute poller.
Instance Method Summary collapse
-
#initialize(poller, adapter) ⇒ Poll
constructor
A new instance of Poll.
Methods included from Flipper::Adapter
#default_config, #export, #get_all, #get_multi, #import, included, #name, #read_only?
Constructor Details
#initialize(poller, adapter) ⇒ Poll
Returns a new instance of Poll.
17 18 19 20 21 22 |
# File 'lib/flipper/adapters/poll.rb', line 17 def initialize(poller, adapter) @adapter = adapter @poller = poller @last_synced_at = 0 @poller.start end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
13 14 15 |
# File 'lib/flipper/adapters/poll.rb', line 13 def adapter @adapter end |
#poller ⇒ Object (readonly)
Returns the value of attribute poller.
13 14 15 |
# File 'lib/flipper/adapters/poll.rb', line 13 def poller @poller end |