Method: RUTL::Camera#pathify
- Defined in:
- lib/rutl/camera.rb
#pathify(path) ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/rutl/camera.rb', line 82 def pathify(path) # Replace any of these with an underscore: # space, octothorpe, slash, backslash, colon, period name = path.gsub(%r{[ \#\/\\\:\.]}, '_') # Also insert a counter and make sure we end with .png. name.sub(/.png$/, '') + '_' + counter + '.png' end |