class RailsAdmin::Config::ConstLoadSuppressor::ConstProxy
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/rails_admin/config/const_load_suppressor.rb, line 47 def initialize(name) @name = name end
Public Instance Methods
klass()
click to toggle source
# File lib/rails_admin/config/const_load_suppressor.rb, line 51 def klass @klass ||= begin unless ::Object.const_defined?(name) ::Kernel.raise <<~MESSAGE The constant #{name} is not loaded yet upon the execution of the RailsAdmin initializer. We don't recommend to do this and may lead to issues, but if you really have to do so you can explicitly require it by adding: require '#{name.underscore}' on top of config/initializers/rails_admin.rb. MESSAGE end name.constantize end end
method_missing(method_name, *args, &block)
click to toggle source
# File lib/rails_admin/config/const_load_suppressor.rb, line 68 def method_missing(method_name, *args, &block) klass.send(method_name, *args, &block) end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/rails_admin/config/const_load_suppressor.rb, line 72 def respond_to_missing?(method_name, include_private = false) super || klass.respond_to?(method_name, include_private) end