class Areilayout::Utils

Public Class Methods

p_error(msg) click to toggle source
# File lib/areilayout/utils.rb, line 5
def self.p_error(msg)
  puts "ERROR: #{msg}"
  false and return
end
p_info(msg) click to toggle source
# File lib/areilayout/utils.rb, line 10
def self.p_info(msg)
  puts "INFO: #{msg}"
end
rmdir(layout_name) click to toggle source
# File lib/areilayout/utils.rb, line 14
def self.rmdir(layout_name)
  FileUtils.remove_entry("#{Dir.tmpdir}/#{layout_name}")
end
tagclip(contents, tag) click to toggle source
# File lib/areilayout/utils.rb, line 18
def self.tagclip(contents, tag)
  /<#{tag}.*>((\n|.)*)<\/#{tag}>/ =~ contents
  return [$&, $1]
end