Spec-Zone.ru › Ruby on Rails 7.1

класс ActiveSupport::Configurable::Configuration

Родитель:
ActiveSupport::InheritableOptions

Публичные методы класса

compile_methods!(keys) Показать исходный код
# File activesupport/lib/active_support/configurable.rb, line 20
      def self.compile_methods!(keys)
        keys.reject { |m| method_defined?(m) }.each do |key|
          class_eval <<-RUBY, __FILE__, __LINE__ + 1
            def #{key}; _get(#{key.inspect}); end
          RUBY
        end
      end

Компилирует методы чтения, чтобы не использовать method_missing.

Публичные методы экземпляра

compile_methods!() Показать исходный код
# File activesupport/lib/active_support/configurable.rb, line 15
def compile_methods!
  self.class.compile_methods!(keys)
end

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API