Class: Lino::CommandLine

Inherits:
Object
  • Object
show all
Defined in:
lib/lino/command_line.rb

Instance Method Summary collapse

Constructor Details

#initialize(command_line) ⇒ CommandLine



7
8
9
# File 'lib/lino/command_line.rb', line 7

def initialize(command_line)
  @command_line = command_line
end

Instance Method Details

#execute(stdin: '', stdout: $stdout, stderr: $stderr) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lino/command_line.rb', line 11

def execute(
  stdin: '',
  stdout: $stdout,
  stderr: $stderr
)
  Open4.spawn(
    @command_line,
    stdin: stdin,
    stdout: stdout,
    stderr: stderr
  )
end

#to_sObject



24
25
26
# File 'lib/lino/command_line.rb', line 24

def to_s
  @command_line
end