Sha256: 961a51807620c9f8a71a2193f39d52e6953eff602e20779fd3145957b6f52004

Contents?: true

Size: 453 Bytes

Versions: 15

Compression:

Stored size: 453 Bytes

Contents

require "active_model/railtie"

module EitilWrapper
  class ApplicationDecorator

    include ActiveModel::Model

    def initialize(attributes={}, **kwargs)      
      super attributes
      all_kwargs_to_ivars binding
    end

    def self.method_missing(method_name, *args, **kwargs)
      if %i$ web app $.include?(method_name.to_sym)
        kwargs.any? ? send(:base, *args, **kwargs) : send(:base, *args)
      end
      super
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
eitil-1.4.1 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.4.0 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.12 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.11 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.10 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.9 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.8 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.7 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.6 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.5 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.4 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.3 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.2 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.1 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb
eitil-1.3.0 eitil_wrapper/lib/eitil_wrapper/decorators/application_decorator.rb