Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Forked from kohsuke/gist:2159107
Created March 22, 2012 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboyd/2159112 to your computer and use it in GitHub Desktop.
Save cowboyd/2159112 to your computer and use it in GitHub Desktop.
require 'jenkins/plugin/behavior'
module Jenkins
#
# Defines the equivalent of `hudson.Extension`
#
module Extension
extend Plugin::Behavior
module ClassMethods
def ordinal(n = nil)
end
end
module InstanceMethods
end
end
class Foo
include Extension
ordinal 3
end
class Bar
include Extension
ordinal 5
end
puts Bar.ordinal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment