module StandupMD

The main module for the gem. Provides access to configuration classes.

Public Class Methods

config() click to toggle source

Method for accessing the configuration.

@return [StanupMD::Cli]

# File lib/standup_md.rb, line 19
def self.config
  @config || reset_config
end
config_file_loaded?() click to toggle source

Has a config file been loaded?

@return [Boolean]

# File lib/standup_md.rb, line 44
def self.config_file_loaded?
  @config_file_loaded
end
configure() { |config| ... } click to toggle source

Allows for configuration via a block. Useful when making config files.

@example

StandupMD.configure { |s| s.cli.editor = 'mate' }
# File lib/standup_md.rb, line 36
def self.configure
  yield config
end
load_config_file(file) click to toggle source

Loads a config file.

@param [String] file

@return [String] file

# File lib/standup_md.rb, line 54
def self.load_config_file(file)
  ::File.expand_path(file).tap do |file|
    raise "File #{file} does not exist." unless ::File.file?(file)

    @config_file_loaded = true
    load file
  end
end
reset_config() click to toggle source

Reset all configuration values to their defaults.

@return [StandupMD::Config]

# File lib/standup_md.rb, line 27
def self.reset_config
  @config = StandupMD::Config.new
end