require 'vonagam_items/version'

module VonagamItems
  class Engine < Rails::Engine
    initializer 'vonagam_items' do
      require 'stylus'

      Stylus.debug = Rails.env.development?

      ActiveSupport.on_load :action_controller do
        helper VonagamHelper
      end
    end
  end
end

class Object
  def method_missing( method_name, *args )
    if /^not_(.+)$/ =~ method_name && respond_to?($1)
      block = proc { | *arguments | ! self.send($1,*arguments) }
      
      method($1.to_sym).owner.send( :define_method, method_name, block )
      
      return send( method_name, *args )
    end
    
    super
  end
end
