Class: Lino::Builders::CommandLine
- Inherits:
-
Object
- Object
- Lino::Builders::CommandLine
- Includes:
- Mixins::Appliables, Mixins::Arguments, Mixins::EnvironmentVariables, Mixins::Executor, Mixins::OptionConfig, Mixins::Options, Mixins::StateBoundary, Mixins::Subcommands, Mixins::Validation, Mixins::WorkingDirectory
- Defined in:
- lib/lino/builders/command_line.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(state) ⇒ CommandLine
constructor
A new instance of CommandLine.
Methods included from Mixins::Validation
Methods included from Mixins::Appliables
#with_appliable, #with_appliables
Methods included from Mixins::WorkingDirectory
Methods included from Mixins::Executor
Methods included from Mixins::Subcommands
#with_subcommand, #with_subcommands
Methods included from Mixins::Options
#with_flag, #with_flags, #with_option, #with_options, #with_repeated_option
Methods included from Mixins::OptionConfig
#with_option_placement, #with_option_quoting, #with_option_separator, #with_options_after_arguments, #with_options_after_command, #with_options_after_subcommands
Methods included from Mixins::EnvironmentVariables
#with_environment_variable, #with_environment_variables
Methods included from Mixins::Arguments
#with_argument, #with_arguments
Constructor Details
#initialize(state) ⇒ CommandLine
Returns a new instance of CommandLine.
31 32 33 34 |
# File 'lib/lino/builders/command_line.rb', line 31 def initialize(state) @command = state[:command] super end |
Instance Method Details
#build ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lino/builders/command_line.rb', line 36 def build Model::CommandLine.new( @command, state.merge( options: (@option_separator, @option_quoting, @option_placement), subcommands: build_subcommands(@option_separator, @option_quoting, @option_placement) ) ) end |