Class: Sevgi::Function::Shell::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/sevgi/function/shell.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



21
22
23
# File 'lib/sevgi/function/shell.rb', line 21

def args
  @args
end

#errsObject

Returns the value of attribute errs

Returns:

  • (Object)

    the current value of errs



21
22
23
# File 'lib/sevgi/function/shell.rb', line 21

def errs
  @errs
end

#exit_codeObject

Returns the value of attribute exit_code

Returns:

  • (Object)

    the current value of exit_code



21
22
23
# File 'lib/sevgi/function/shell.rb', line 21

def exit_code
  @exit_code
end

#outsObject

Returns the value of attribute outs

Returns:

  • (Object)

    the current value of outs



21
22
23
# File 'lib/sevgi/function/shell.rb', line 21

def outs
  @outs
end

Class Method Details

.dummyObject



30
# File 'lib/sevgi/function/shell.rb', line 30

def self.dummy = new([], [], [], 0)

Instance Method Details

#allObject



22
# File 'lib/sevgi/function/shell.rb', line 22

def all = [*outs, "\n\n", *errs].join("\n").strip

#cmdObject



23
# File 'lib/sevgi/function/shell.rb', line 23

def cmd = args.join(" ")

#errObject



24
# File 'lib/sevgi/function/shell.rb', line 24

def err = errs.join("\n")

#notok?Boolean

Returns:

  • (Boolean)


25
# File 'lib/sevgi/function/shell.rb', line 25

def notok? = !ok?

#ok?Boolean

Returns:

  • (Boolean)


26
# File 'lib/sevgi/function/shell.rb', line 26

def ok? = exit_code&.zero?

#outObject



27
# File 'lib/sevgi/function/shell.rb', line 27

def out = outs.join("\n")

#outlineObject



28
# File 'lib/sevgi/function/shell.rb', line 28

def outline = outs.first