Class: Maglev::PublishSiteCommand
- Inherits:
-
Rails::Command::Base
- Object
- Rails::Command::Base
- Maglev::PublishSiteCommand
- Defined in:
- lib/commands/maglev/publish_site_command.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner(_command = nil) ⇒ Object
9 10 11 |
# File 'lib/commands/maglev/publish_site_command.rb', line 9 def self.(_command = nil, *) 'bin/rails maglev:publish_site' end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/commands/maglev/publish_site_command.rb', line 13 def perform require File.('config/environment') site = fetch_site return if site.blank? publish_pages(site) say '🎉 All the pages of the site have been published with success!' end |