class Helper

Public Class Methods

is_integer?(string) click to toggle source
# File lib/KMQToolKitGem/helper.rb, line 5
def self.is_integer?(string)
  true if Integer(string) rescue false
end
write_to_file(absolute_file_path, template_path, bindings) click to toggle source
# File lib/KMQToolKitGem/helper.rb, line 9
def self.write_to_file(absolute_file_path, template_path, bindings)
  template = ERB.new File.new(template_path).read, nil, "%"
  File.open(absolute_file_path, 'w') do |f|
    text = template.result bindings
    f.write text
  end
end