Class: ActiveSupport::Configurable::Configuration
- Inherits:
-
InheritableOptions
- Object
- Hash
- OrderedOptions
- InheritableOptions
- ActiveSupport::Configurable::Configuration
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/configurable.rb
Class Method Summary collapse
-
.compile_methods!(keys) ⇒ Object
Compiles reader methods so we don’t have to go through method_missing.
Instance Method Summary collapse
Methods inherited from InheritableOptions
#inheritable_copy, #initialize
Methods inherited from OrderedOptions
#[], #[]=, #extractable_options?, #inspect, #method_missing, #respond_to_missing?
Methods inherited from Hash
#as_json, #assert_valid_keys, #compact_blank, #compact_blank!, #deep_dup, #deep_merge, #deep_merge!, #deep_stringify_keys, #deep_stringify_keys!, #deep_symbolize_keys, #deep_symbolize_keys!, #deep_transform_keys, #deep_transform_keys!, #deep_transform_values, #deep_transform_values!, #except, #except!, #extract!, #extractable_options?, from_trusted_xml, from_xml, #reverse_merge, #reverse_merge!, #slice!, #stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!, #to_query, #to_xml, #with_indifferent_access
Constructor Details
This class inherits a constructor from ActiveSupport::InheritableOptions
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveSupport::OrderedOptions
Class Method Details
.compile_methods!(keys) ⇒ Object
Compiles reader methods so we don’t have to go through method_missing.
18 19 20 21 22 23 24 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/configurable.rb', line 18 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 |
Instance Method Details
#compile_methods! ⇒ Object
13 14 15 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/configurable.rb', line 13 def compile_methods! self.class.compile_methods!(keys) end |