Class: Maglev::Sections::RemoveCommand
- Inherits:
-
Rails::Command::Base
- Object
- Rails::Command::Base
- Maglev::Sections::RemoveCommand
- Defined in:
- lib/commands/maglev/sections/remove_command.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
10 11 12 |
# File 'lib/commands/maglev/sections/remove_command.rb', line 10 def self. 'bin/rails maglev:sections:remove TYPE' end |
Instance Method Details
#perform(type) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/commands/maglev/sections/remove_command.rb', line 14 def perform(type) require File.('config/environment', Rails.root) site = fetch_site return if site.blank? removed_count = Maglev::RemoveSectionType.call( site: site, type: type ) (removed_count, type) end |