class Spectator::Config::CLIArgumentsApplicator

Overview

Applies command-line arguments to a configuration.

Defined in:

spectator/config/cli_arguments_applicator.cr

Constant Summary

Log = Spectator::Log.for("config")

Logger for this class.

Constructors

Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not

Constructor Detail

def self.new(args : Array(String) = ARGV) #

Creates the configuration source. By default, the command-line arguments (ARGV) are used. But custom arguments can be passed in.


[View source]

Instance Method Detail

def apply(builder) : Nil #

Applies the specified configuration to a builder. Calling this method from multiple sources builds up the final configuration.


[View source]