Class: Radiant::Extension::Script::Help

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

Instance Method Summary collapse

Constructor Details

#initialize(args = []) ⇒ Help

Returns a new instance of Help.



342
343
344
345
346
# File 'lib/radiant/extension/script.rb', line 342

def initialize(args=[])
  command = args.shift
  command = 'help' unless self.class.instance_methods(false).include?(command)
  send(command)
end

Instance Method Details

#helpObject



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

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



379
380
381
382
383
384
# File 'lib/radiant/extension/script.rb', line 379

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

  Displays registry information about the extension.
  }
end

#installObject



365
366
367
368
369
370
# File 'lib/radiant/extension/script.rb', line 365

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

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

#uninstallObject



372
373
374
375
376
377
# File 'lib/radiant/extension/script.rb', line 372

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

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