Class: Computering::Dsl::Command

Inherits:
Text
  • Object
show all
Defined in:
lib/computering/dsl/command.rb

Instance Attribute Summary

Attributes inherited from Text

#text

Instance Method Summary collapse

Methods inherited from Text

#[], #blank?, #buffer, from_text, #initialize, #padding

Constructor Details

This class inherits a constructor from Computering::Dsl::Text

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
# File 'lib/computering/dsl/command.rb', line 5

def execute
  @buffer = "\n"
  Bundler.with_clean_env do
    @buffer << `#{@text}`.chomp
  end
rescue
  @buffer << add_style($!.message, :error)
end