class StandupMD::Config::Cli
The configuration class for StandupMD::Cli
Constants
- CONFIG_ATTRIBUTES
-
Attributes copied into request-scoped config snapshots.
@return [Array<Symbol>]
- DEFAULTS
-
The default options.
@return [Hash]
Attributes
When writing a new entry, should โpreviousโ be pulled from the last entry?
@param [Boolean] auto_fill_previous
@return [Boolean]
The date to use to find the entry.
@param [Date] date
@return [Date]
Should the CLI edit?
@param [Boolean] edit
@return [Boolean]
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]
Should the CLI post the entry to a chat client?
@param [Boolean] post
@return [Boolean]
The chat adapter to use for posting.
@param [String, Symbol, nil] post_adapter
@return [String, Symbol, nil]
Should the CLI print the entry to the command line?
@param [Boolean] print
@return [Boolean]
Should the CLI print verbose output?
@param [Boolean] verbose
@return [Boolean]
Should the CLI automatically write the new entry to the file?
@param [Boolean] write
@return [Boolean]
Public Class Methods
Source
# File lib/standup_md/config/cli.rb, line 128 def initialize reset end
Initializes the config with default values.
Public Instance Methods
Source
# File lib/standup_md/config/cli.rb, line 148 def copy_from(config) CONFIG_ATTRIBUTES.each do |attribute| instance_variable_set( "@#{attribute}", copy_default(config.public_send(attribute)) ) end self end
Copies values from another CLI config.
@param [StandupMD::Config::Cli] config
@return [StandupMD::Config::Cli]
Source
# File lib/standup_md/config/cli.rb, line 136 def reset DEFAULTS.each do |key, value| instance_variable_set("@#{key}", copy_default(resolve_default(value))) end end
Sets all config values back to their defaults.
@return [Hash]