lib/smallcage/commands/uri.rb in smallcage-0.2.4 vs lib/smallcage/commands/uri.rb in smallcage-0.2.5
- old
+ new
@@ -2,21 +2,21 @@
class Uri
def self.execute(opts)
self.new(opts).execute
end
-
+
def initialize(opts)
@opts = opts
end
-
+
def execute
target = Pathname.new(@opts[:path])
unless target.exist?
raise "target directory or file does not exist.: " + target.to_s
end
-
+
@loader = SmallCage::Loader.new(target)
@renderer = SmallCage::Renderer.new(@loader)
print_uris
end
@@ -36,11 +36,10 @@
end
end
private :print_default_or_template_uris
def print_uri_templates(obj, uris)
-
uris = uris.map {|uri| uri.strip }
base = obj['path'].parent
uris.each_with_index do |uri, index|
if uri.empty?
puts ""
@@ -49,8 +48,7 @@
puts docpath.uri
end
end
end
private :print_uri_templates
-
end
end