class Spectator::Config::CLIArgumentsApplicator
Overview
Applies command-line arguments to a configuration.
Defined in:
spectator/config/cli_arguments_applicator.crConstant Summary
-
Log =
Spectator::Log.for("config")
-
Logger for this class.
Constructors
-
.new(args : Array(String) = ARGV)
Creates the configuration source.
Instance Method Summary
-
#apply(builder) : Nil
Applies the specified configuration to a builder.
Instance methods inherited from class Object
should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(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.
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.