Top Level Namespace

Defined Under Namespace

Modules: FoodCourt

Instance Method Summary collapse

Instance Method Details

#create_or_replace_file(file_name, lines) ⇒ Object



1
2
3
4
5
6
7
# File 'lib/food_court/packages/base.rb', line 1

def create_or_replace_file(file_name, lines)
  result = ["rm -rf #{file_name}"]
  lines.each do |line|
    result << %(echo '#{line}' >> #{file_name})
  end
  result.join(' && ')
end