Class: ContentCommand
- Defined in:
- lib/spiderfw/cmd/commands/content.rb
Instance Method Summary collapse
-
#initialize ⇒ ContentCommand
constructor
A new instance of ContentCommand.
Constructor Details
#initialize ⇒ ContentCommand
Returns a new instance of ContentCommand.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/spiderfw/cmd/commands/content.rb', line 6 def initialize super( 'content', true, true ) @short_desc = _("Manage static content") publish = CmdParse::Command.new( 'publish', false ) publish.short_desc = _("Publish apps static content to home public folder") publish. = CmdParse::OptionParserWrapper.new do |opt| end publish.set_execution_block do |args| require 'spiderfw' Spider::StaticContent.publish end self.add_command(publish) compress = CmdParse::Command.new('compress', false) compress.short_desc = _("Compress Javascript files") compress.set_execution_block do |args| require 'spiderfw' Spider::ContentUtils.compress(*args) end self.add_command(compress) end |