Class: Dotenv::CLI

### Home Classes Methods

### In Files

- lib/dotenv/cli.rb

### Parent

Object

### Methods

- ::new
- #run

### Class/Module Index

Quicksearch

- Dotenv
- Dotenv::CLI
- Dotenv::Environment
- Dotenv::FormatError
- Dotenv::Parser
- Dotenv::Substitutions
- Dotenv::Substitutions::Command
- Dotenv::Substitutions::Variable

No matching classes.

# Dotenv::CLI

The CLI is a class responsible of handling all the command line interface logic.

### Attributes

argv[R]

### Public Class Methods

new(argv = []) click to toggle source

    # File lib/dotenv/cli.rb, line 9
    def initialize(argv = [])
      @argv = argv.dup
    end

### Public Instance Methods

run() click to toggle source

    # File lib/dotenv/cli.rb, line 13
    def run
      filenames = parse_filenames || []
      begin
        Dotenv.load!(*filenames)
      rescue Errno::ENOENT => e
        abort e.message
      else
        exec(*argv) unless argv.empty?
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.