Class: Rubigen::CLI

### Home Classes Methods

### In Files

- lib/rubigen/cli.rb

### Parent

Object

### Methods

- ::execute
- #execute
- #main_usage

### Files

- History.txt
- License.txt
- Manifest.txt
- Todo.txt
- README.txt
- index.txt
- version-raw.txt
- version.txt

### Class/Module Index

Quicksearch

- RubiGen
- RubiGen::AbstractGemSource
- RubiGen::Base
- RubiGen::Commands
- RubiGen::Commands::Base
- RubiGen::Commands::Create
- RubiGen::Commands::Destroy
- RubiGen::Commands::List
- RubiGen::Commands::RewindBase
- RubiGen::Commands::Update
- RubiGen::GemPathSource
- RubiGen::GeneratedAttribute
- RubiGen::GeneratorError
- RubiGen::GeneratorTestHelper
- RubiGen::Lookup
- RubiGen::Lookup::ClassMethods
- RubiGen::Manifest
- RubiGen::Options
- RubiGen::Options::ClassMethods
- RubiGen::PathFilteredSource
- RubiGen::PathSource
- RubiGen::Scripts
- RubiGen::Scripts::Base
- RubiGen::Scripts::Destroy
- RubiGen::Scripts::Generate
- RubiGen::Scripts::Update
- RubiGen::Source
- RubiGen::Spec
- RubiGen::UsageError
- Rubigen
- Rubigen::CLI
- Dir
- Object

No matching classes.

# Rubigen::CLI

### Attributes

stdout[R]

### Public Class Methods

execute(stdout, arguments, runtime_arguments = {}) click to toggle source

    # File lib/rubigen/cli.rb, line 7
    def self.execute(stdout, arguments, runtime_arguments = {})
      self.new.execute(stdout, arguments, runtime_arguments)
    end

### Public Instance Methods

execute(stdout, arguments, runtime_arguments = {}) click to toggle source

    # File lib/rubigen/cli.rb, line 11
    def execute(stdout, arguments, runtime_arguments = {})
      @stdout = stdout
      main_usage and return unless scope = arguments.shift
      scopes = scope.split(",").map(&:to_sym)

      runtime_arguments.merge!(:stdout => stdout, :no_exit => true)
      RubiGen::Base.logger = RubiGen::SimpleLogger.new(stdout)

      require 'rubigen/scripts/generate'
      RubiGen::Base.use_component_sources!(scopes)
      RubiGen::Scripts::Generate.new.run(arguments, runtime_arguments)
    end

main_usage() click to toggle source

    # File lib/rubigen/cli.rb, line 24
    def main_usage
      stdout.puts       Usage: $0 scope generator [options for generator].gsub(/^        /, '')
      true
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.