Skip to content

Instantly share code, notes, and snippets.

@mzemel
Created October 21, 2015 23:52
Show Gist options
  • Save mzemel/13b4b755e2ac5fa2e256 to your computer and use it in GitHub Desktop.
Save mzemel/13b4b755e2ac5fa2e256 to your computer and use it in GitHub Desktop.
module XMLibrary
def self.included(base)
base.class_eval do
def parse(arg)
# ...
end
end
end
end
class Formatter
include XMLibrary
# Can now use #parse
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment