Class: Stoplight::Admin::Dependencies
- Inherits:
-
Object
- Object
- Stoplight::Admin::Dependencies
- Defined in:
- lib/stoplight/admin/dependencies.rb
Instance Attribute Summary collapse
- #data_store ⇒ Stoplight::DataStore::Base writeonly
Instance Method Summary collapse
- #green_action ⇒ Stoplight::Admin::Actions::LockGreen
- #green_all_action ⇒ Stoplight::Admin::Actions::LockAllGreen
-
#initialize(data_store:) ⇒ Dependencies
constructor
A new instance of Dependencies.
- #lights_repository ⇒ Stoplight::Admin::LightsRepository
- #red_action ⇒ Stoplight::Admin::Actions::LockRed
- #remove_action ⇒ Stoplight::Admin::Actions::Remove
- #stats_action ⇒ Stoplight::Admin::Actions::Stats
- #unlock_action ⇒ Stoplight::Admin::Actions::Unlock
Constructor Details
#initialize(data_store:) ⇒ Dependencies
Returns a new instance of Dependencies.
12 13 14 |
# File 'lib/stoplight/admin/dependencies.rb', line 12 def initialize(data_store:) @data_store = data_store end |
Instance Attribute Details
#data_store=(value) ⇒ Stoplight::DataStore::Base
8 9 10 |
# File 'lib/stoplight/admin/dependencies.rb', line 8 def data_store @data_store end |
Instance Method Details
#green_action ⇒ Stoplight::Admin::Actions::LockGreen
35 36 37 |
# File 'lib/stoplight/admin/dependencies.rb', line 35 def green_action Stoplight::Admin::Actions::LockGreen.new(lights_repository: lights_repository) end |
#green_all_action ⇒ Stoplight::Admin::Actions::LockAllGreen
45 46 47 |
# File 'lib/stoplight/admin/dependencies.rb', line 45 def green_all_action Stoplight::Admin::Actions::LockAllGreen.new(lights_repository: lights_repository) end |
#lights_repository ⇒ Stoplight::Admin::LightsRepository
17 18 19 |
# File 'lib/stoplight/admin/dependencies.rb', line 17 def lights_repository Stoplight::Admin::LightsRepository.new(data_store: data_store) end |
#red_action ⇒ Stoplight::Admin::Actions::LockRed
40 41 42 |
# File 'lib/stoplight/admin/dependencies.rb', line 40 def red_action Stoplight::Admin::Actions::LockRed.new(lights_repository: lights_repository) end |
#remove_action ⇒ Stoplight::Admin::Actions::Remove
50 51 52 |
# File 'lib/stoplight/admin/dependencies.rb', line 50 def remove_action Stoplight::Admin::Actions::Remove.new(lights_repository: lights_repository) end |
#stats_action ⇒ Stoplight::Admin::Actions::Stats
22 23 24 25 26 27 |
# File 'lib/stoplight/admin/dependencies.rb', line 22 def stats_action Stoplight::Admin::Actions::Stats.new( lights_repository: lights_repository, lights_stats: Stoplight::Admin::LightsStats ) end |