Class: StoplightAdmin::Actions::LockRed

Inherits:
Action
  • Object
show all
Defined in:
lib/stoplight_admin/actions/lock_red.rb

Overview

This action locks light with the specific name red

Instance Method Summary collapse

Methods inherited from Action

#initialize

Constructor Details

This class inherits a constructor from StoplightAdmin::Actions::Action

Instance Method Details

#call(params) ⇒ void



9
10
11
12
13
# File 'lib/stoplight_admin/actions/lock_red.rb', line 9

def call(params)
  light_names(params).each do |name|
    lights_repository.lock(name, RED)
  end
end