module CTIMethod::Extensions

Public Instance Methods

cti_method(*methods) click to toggle source
# File lib/cti_method/extensions.rb, line 3
def cti_method(*methods)
  methods.each do |method_name|
    define_singleton_method(method_name) do |*args|
      begin
        new.send(method_name, *args)
      rescue ArgumentError => e
        raise CTIInitializationError.new(e)
      end
    end
  end
end