Class: TrustyCms::Extension::Script::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/trusty_cms/extension/script.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = []) ⇒ Help

Returns a new instance of Help.



344
345
346
347
348
# File 'lib/trusty_cms/extension/script.rb', line 344

def initialize(args=[])
  command = args.shift
  command = 'help' unless self.class.instance_methods(false).collect {|im| im.to_s}.include?(command.to_s)
  send(command)
end

Instance Method Details

#helpObject



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/trusty_cms/extension/script.rb', line 350

def help
  $stdout.puts %{Usage:   script/extension command [arguments]

  Available commands:
      #{command_names}

  For help on an individual command:
      script/extension help command

  You may install extensions from another registry by setting the REGISTRY_URL
  By default the REGISTRY_URL is set to http://ext.radiantcms.org

  Code for the registry application may be found at:
  http://github.com/radiant/radiant-extension-registry/
    }
end

#infoObject



381
382
383
384
385
386
# File 'lib/trusty_cms/extension/script.rb', line 381

def info
  $stdout.puts %{Usage:    script/extension info extension_name

  Displays registry information about the extension.
  }
end

#installObject



367
368
369
370
371
372
# File 'lib/trusty_cms/extension/script.rb', line 367

def install
  $stdout.puts %{Usage:    script/extension install extension_name

  Installs an extension from information in the global registry.
  }
end

#uninstallObject



374
375
376
377
378
379
# File 'lib/trusty_cms/extension/script.rb', line 374

def uninstall
  $stdout.puts %{Usage:    script/extension uninstall extension_name

  Removes a previously installed extension from the current project.
    }
end