Spec-Zone.ru › Ruby on Rails 8.1

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

Родительский класс:
ActiveSupport::InheritableOptions

Открытые методы класса

compile_methods! (keys) Показать исходный код
# File activesupport/lib/active_support/configurable.rb, line 26
      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 21
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