Skip to content

Instantly share code, notes, and snippets.

@lune-sta
Created July 31, 2014 05:47
Show Gist options
  • Save lune-sta/62912a06e81e542a5167 to your computer and use it in GitHub Desktop.
Save lune-sta/62912a06e81e542a5167 to your computer and use it in GitHub Desktop.
=begin
def method_missing(name, *argv, &block)
if name =~ /^def_/
source, args = block.to_source(argv)
def_macro(name, source, args)
else
p 'macro_' + name.to_s
if Ixia.method_defined?(('macro_' + name.to_s).to_sym)
Ixia.send('macro_' + name.to_s)
else
super
end
end
end
def def_macro(name, source, args)
p name
p source
p args
end
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment