Skip to content

Instantly share code, notes, and snippets.

hunj / path_stripper.rb
Created Jun 25, 2015
Strip path from domain, off from sitemap xml file.
View path_stripper.rb
def path_strip(input_file, domain, output_file)
raise "domain must be string form" unless domain.is_a? String
raise "invalid input file name" unless input_file.is_a? String
raise "invalid output file name" unless output_file.is_a? String
file =, "r")
data =
data_lines = data.lines
cleared_arr = []
hunj / rdoc_example.rb
Created May 28, 2015
Ruby RDoc Example
View rdoc_example.rb
## Found in:
# * Style guide based on Rails documention
module Namespace #:nodoc: don't document this
# Generic Namespace exception class
class NamespaceError < StandardError
# Raised when...