Top Level Namespace

Defined Under Namespace

Modules: AppleCart

Instance Method Summary collapse

Instance Method Details

#copy_source_file(file, *args) ⇒ Object



11
12
13
# File 'lib/apple_cart/helpers.rb', line 11

def copy_source_file(file, *args)
  copy_file source_path_for(file), file, *args
end

#source_path_for(file) ⇒ Object



15
16
17
# File 'lib/apple_cart/helpers.rb', line 15

def source_path_for(file)
  File.join(@source_root, file)
end

#talk(message, skip_blank = false) ⇒ Object



1
2
3
4
5
6
7
8
9
# File 'lib/apple_cart/helpers.rb', line 1

def talk(message, skip_blank = false)
  left_just_size = ((80 - message.length - 4) / 2).round + message.length
  message = message.ljust(left_just_size).rjust(76)

  puts "" unless skip_blank
  puts "*" * 80
  puts "**#{message}**"
  puts "*" * 80
end