class Prow::Template

Public Instance Methods

content() click to toggle source
# File lib/prow/template.rb, line 11
def content
  @content ||= File.read(path)
end
name() click to toggle source
# File lib/prow/template.rb, line 7
def name
  name_path_parts.join('/')
end
name_path_parts() click to toggle source
# File lib/prow/template.rb, line 23
def name_path_parts
  (path_parts - [type]).map {|e| e.split('.').first }
end
partial_path() click to toggle source
# File lib/prow/template.rb, line 15
def partial_path
  path.gsub(templates_path, '')
end
path_parts() click to toggle source
# File lib/prow/template.rb, line 19
def path_parts
  partial_path.split("/").select{|p| !p.empty? }
end
type() click to toggle source
# File lib/prow/template.rb, line 3
def type
  path_parts.first
end