instance methods
# File lib/sugar-high/file_ext.rb, line 47 def blank? File.zero?(self.path) end
# File lib/sugar-high/file_ext.rb, line 51 def has_content? content_matcher = nil, &block content_matcher ||= yield begin content_matcher = content_matcher.to_regexp rescue raise ArgumentError, "Content match must be specified as either a String or Regexp" end matched = self.read_content =~ content_matcher !(matched).nil? end
# File lib/sugar-high/file_ext.rb, line 62 def read_content options = {}, &block File.read_from self.path, options, &block end
Generated with the Darkfish Rdoc Generator 2.