Skip to content

Instantly share code, notes, and snippets.

@bricker
Created February 11, 2014 05:18
Show Gist options
  • Save bricker/8929617 to your computer and use it in GitHub Desktop.
Save bricker/8929617 to your computer and use it in GitHub Desktop.
class FirstParser
def self.parse(url)
parser = Inner.new(url)
parser.parse
end
class Inner
def initialize(url)
@url = url
end
def parse
// do your parsing with @url
end
end
end
class SecondParser
def self.parse(url)
parser = Inner.new(url)
parser.parse
end
class Inner
def initialize(url)
@url = url
end
def parse
// A different kind of parsing
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment