lib/headdesk/apk/resources.rb in headdesk-0.8.0 vs lib/headdesk/apk/resources.rb in headdesk-0.9.0
- old
+ new
@@ -14,9 +14,17 @@
def values(modifiers = {})
XmlCollection.new(@path, 'values', modifiers)
end
+ def file?(file_name)
+ File.exist? path_for(file_name)
+ end
+
+ def path_for(file_name)
+ "#{@path}/#{file_name.sub(%r{^\/}, '')}"
+ end
+
#
# Collection of XML values for specific locale/api/etc
#
class XmlCollection
# :reek:NestedIterators and :reek:TooManyStatements