Skip to content

Instantly share code, notes, and snippets.

@fabiokr
Created June 1, 2012 20:06
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 fabiokr/2854838 to your computer and use it in GitHub Desktop.
Save fabiokr/2854838 to your computer and use it in GitHub Desktop.
class Service
def handler
@handler ||= Kindly.with_service(self)
end
delegate :provision, :deprovision, to: :handler
end
class Kindly
def self.with_service(service)
service.handler_type.constantize.new(service)
end
end
class Cpanel
def initialize(service)
@lumberg = Lumberg::Whm::Server.new(host: service.server, hash: service.whm_hash)
end
end
service.provision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment