class StandupMD::Config::Cli

The configuration class for StandupMD::Cli

Constants

DEFAULTS

The default options.

@return [Hash]

Attributes

auto_fill_previous[RW]

When writing a new entry, should 'previous' be pulled from the last entry?

@param [Boolean] auto_fill_previous

@return [Boolean]

date[RW]

The date to use to find the entry.

@param [Date] date

@return [Date]

edit[RW]

Should the cli edit?

@param [Boolean] edit

@return [Boolean]

editor[RW]

The editor to use when opening standup files. If one is not set, the first of $VISUAL, $EDITOR, or vim will be used, in that order.

@param [String] editor

@return [String]

preference_file[RW]

The preference file for Cli.

@param [String] preference

@return [String]

print[RW]

Should the cli print the entry to the command line?

@param [Boolean] print

@return [Boolean]

verbose[RW]

Should the cli print verbose output?

@param [Boolean] verbose

@return [Boolean]

write[RW]

Should the cli automatically write the new entry to the file?

@param [Boolean] write

@return [Boolean]

Public Class Methods

new() click to toggle source

Initializes the config with default values.

# File lib/standup_md/config/cli.rb, line 95
def initialize
  reset
end

Public Instance Methods

reset() click to toggle source

Sets all config values back to their defaults.

@return [Hash]

# File lib/standup_md/config/cli.rb, line 103
def reset
  DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
end