lib/motion/project/templates.rb in motion-sparkle-0.0.5 vs lib/motion/project/templates.rb in motion-sparkle-0.0.6
- old
+ new
@@ -1,24 +1,19 @@
require 'erb'
require 'rexml/document'
-module Motion; module Project
-
+module Motion::Project
class Sparkle
- # for ERB
- # attr_reader :name
- TemplatePaths = [
+ TEMPLATE_PATHS = [
File.expand_path(File.join(__FILE__, '../appcast'))
]
- Templates = TemplatePaths.map { |path| Dir.glob(path + '/*') }.flatten.map { |x| File.basename(x) }
-
def all_templates
@all_templates ||= begin
templates = {}
- TemplatePaths.map { |path| Dir.glob(path + '/*') }.flatten.each do |template_path|
+ TEMPLATE_PATHS.map { |path| Dir.glob(path + '/*') }.flatten.each do |template_path|
templates[File.basename(template_path)] = template_path
end
templates
end
end
@@ -34,7 +29,6 @@
end
end
end
end
-
-end; end
+end