class Spectator::CommandLineArgumentsConfigSource
Overview
Generates configuration from the command-line arguments.
Defined in:
spectator/command_line_arguments_config_source.crConstructors
-
.new(args : Array(String) = ARGV)
Creates the configuration source.
Instance Method Summary
-
#apply_to(builder : ConfigBuilder) : Nil
Applies the specified configuration to a builder.
Instance methods inherited from class Spectator::ConfigSource
apply_to(builder : ConfigBuilder) : Nil
apply_to
Instance methods inherited from class Object
should(matcher)
should,
should_eventually(matcher)
should_eventually,
should_never(matcher)
should_never,
should_not(matcher)
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_to(builder : ConfigBuilder) : Nil
#
Applies the specified configuration to a builder. Calling this method from multiple sources builds up the final configuration.