Sha256: aa427a9abe6341cb40b97f8e397234829e801f0311c6d6636dbafb541e6d9886
Contents?: true
Size: 630 Bytes
Versions: 13
Compression:
Stored size: 630 Bytes
Contents
module SmallCage module BaseHelper include ERB::Util def _glob(relpath, rex) base_dir = Pathname.new(@obj["path"]).parent base_dir = base_dir.join(relpath) entries = Dir.glob("#{base_dir}/**/*") result = [] entries.each do |path| result << path if path.to_s =~ rex end return result.sort end def _with(o) tmpobj = @obj @obj = o yield @obj = tmpobj end def _load(path) path = Pathname.new(path) @loader.load(path) end def _erb(body) @renderer.render_string(body, @obj) end end end
Version data entries
13 entries across 13 versions & 2 rubygems