Class: Lino::Builders::CommandLine

Instance Method Summary collapse

Methods included from Mixins::Validation

#empty?, #nil_or_empty?

Methods included from Mixins::Appliables

#with_appliable, #with_appliables

Methods included from Mixins::WorkingDirectory

#with_working_directory

Methods included from Mixins::Executor

#with_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

#buildObject



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: build_options(@option_separator, @option_quoting,
                             @option_placement),
      subcommands: build_subcommands(@option_separator, @option_quoting,
                                     @option_placement)
    )
  )
end