Class: StoplightAdmin::Actions::LockAllGreen
- Defined in:
- lib/stoplight_admin/actions/lock_all_green.rb
Overview
This action locks all lights green
Instance Method Summary collapse
Methods inherited from Action
Constructor Details
This class inherits a constructor from StoplightAdmin::Actions::Action
Instance Method Details
#call ⇒ void
This method returns an undefined value.
8 9 10 11 12 13 |
# File 'lib/stoplight_admin/actions/lock_all_green.rb', line 8 def call(*) lights_repository .with_color(RED, YELLOW) .map(&:name) .each { |name| lights_repository.lock(name, GREEN) } end |