Module: ActiveSupport

Extended by:
Autoload
Defined in:
activesupport/lib/active_support/multibyte.rb,
activesupport/lib/active_support.rb,
activesupport/lib/active_support/gzip.rb,
activesupport/lib/active_support/time.rb,
activesupport/lib/active_support/cache.rb,
activesupport/lib/active_support/logger.rb,
activesupport/lib/active_support/railtie.rb,
activesupport/lib/active_support/version.rb,
activesupport/lib/active_support/concern.rb,
activesupport/lib/active_support/duration.rb,
activesupport/lib/active_support/xml_mini.rb,
activesupport/lib/active_support/callbacks.rb,
activesupport/lib/active_support/rescuable.rb,
activesupport/lib/active_support/test_case.rb,
activesupport/lib/active_support/subscriber.rb,
activesupport/lib/active_support/inflections.rb,
activesupport/lib/active_support/deprecation.rb,
activesupport/lib/active_support/configurable.rb,
activesupport/lib/active_support/dependencies.rb,
activesupport/lib/active_support/file_watcher.rb,
activesupport/lib/active_support/ordered_hash.rb,
activesupport/lib/active_support/proxy_object.rb,
activesupport/lib/active_support/benchmarkable.rb,
activesupport/lib/active_support/json/encoding.rb,
activesupport/lib/active_support/json/decoding.rb,
activesupport/lib/active_support/xml_mini/jdom.rb,
activesupport/lib/active_support/option_merger.rb,
activesupport/lib/active_support/notifications.rb,
activesupport/lib/active_support/number_helper.rb,
activesupport/lib/active_support/key_generator.rb,
activesupport/lib/active_support/xml_mini/rexml.rb,
activesupport/lib/active_support/time_with_zone.rb,
activesupport/lib/active_support/tagged_logging.rb,
activesupport/lib/active_support/log_subscriber.rb,
activesupport/lib/active_support/multibyte/chars.rb,
activesupport/lib/active_support/string_inquirer.rb,
activesupport/lib/active_support/lazy_load_hooks.rb,
activesupport/lib/active_support/ordered_options.rb,
activesupport/lib/active_support/xml_mini/libxml.rb,
activesupport/lib/active_support/values/time_zone.rb,
activesupport/lib/active_support/cache/file_store.rb,
activesupport/lib/active_support/cache/null_store.rb,
activesupport/lib/active_support/message_verifier.rb,
activesupport/lib/active_support/multibyte/unicode.rb,
activesupport/lib/active_support/testing/isolation.rb,
activesupport/lib/active_support/backtrace_cleaner.rb,
activesupport/lib/active_support/xml_mini/nokogiri.rb,
activesupport/lib/active_support/concurrency/latch.rb,
activesupport/lib/active_support/inflector/methods.rb,
activesupport/lib/active_support/message_encryptor.rb,
activesupport/lib/active_support/testing/assertions.rb,
activesupport/lib/active_support/xml_mini/libxmlsax.rb,
activesupport/lib/active_support/cache/memory_store.rb,
activesupport/lib/active_support/testing/declarative.rb,
activesupport/lib/active_support/testing/deprecation.rb,
activesupport/lib/active_support/descendants_tracker.rb,
activesupport/lib/active_support/file_update_checker.rb,
activesupport/lib/active_support/per_thread_registry.rb,
activesupport/lib/active_support/notifications/fanout.rb,
activesupport/lib/active_support/xml_mini/nokogirisax.rb,
activesupport/lib/active_support/deprecation/reporting.rb,
activesupport/lib/active_support/deprecation/behaviors.rb,
activesupport/lib/active_support/cache/mem_cache_store.rb,
activesupport/lib/active_support/inflector/inflections.rb,
activesupport/lib/active_support/dependencies/autoload.rb,
activesupport/lib/active_support/testing/tagged_logging.rb,
activesupport/lib/active_support/testing/constant_lookup.rb,
activesupport/lib/active_support/inflector/transliterate.rb,
activesupport/lib/active_support/core_ext/hash/conversions.rb,
activesupport/lib/active_support/testing/setup_and_teardown.rb,
activesupport/lib/active_support/deprecation/proxy_wrappers.rb,
activesupport/lib/active_support/log_subscriber/test_helper.rb,
activesupport/lib/active_support/notifications/instrumenter.rb,
activesupport/lib/active_support/cache/strategy/local_cache.rb,
activesupport/lib/active_support/deprecation/method_wrappers.rb,
activesupport/lib/active_support/hash_with_indifferent_access.rb,
activesupport/lib/active_support/core_ext/string/output_safety.rb,
activesupport/lib/active_support/deprecation/instance_delegator.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Autoload, Benchmarkable, Cache, Callbacks, Concern, Concurrency, Configurable, Dependencies, DescendantsTracker, Gzip, Inflector, JSON, Multibyte, Notifications, NumberHelper, PerThreadRegistry, Rescuable, TaggedLogging, Testing, VERSION, XmlMini, XmlMini_JDOM, XmlMini_LibXML, XmlMini_LibXMLSAX, XmlMini_Nokogiri, XmlMini_NokogiriSAX, XmlMini_REXML Classes: BacktraceCleaner, CachingKeyGenerator, Deprecation, Duration, FileUpdateChecker, FileWatcher, HashWithIndifferentAccess, InheritableOptions, KeyGenerator, LegacyKeyGenerator, LogSubscriber, Logger, MessageEncryptor, MessageVerifier, OptionMerger, OrderedHash, OrderedOptions, ProxyObject, Railtie, SafeBuffer, StringInquirer, Subscriber, SubscriberQueueRegistry, TestCase, TimeWithZone, TimeZone, XMLConverter

Class Method Summary collapse

Methods included from Autoload

autoload, autoload_at, autoload_under, autoloads, eager_autoload, eager_load!, extended

Class Method Details

.execute_hook(base, options, block) ⇒ Object



34
35
36
37
38
39
40
# File 'activesupport/lib/active_support/lazy_load_hooks.rb', line 34

def self.execute_hook(base, options, block)
  if options[:yield]
    block.call(base)
  else
    base.instance_eval(&block)
  end
end

.on_load(name, options = {}, &block) ⇒ Object



26
27
28
29
30
31
32
# File 'activesupport/lib/active_support/lazy_load_hooks.rb', line 26

def self.on_load(name, options = {}, &block)
  @loaded[name].each do |base|
    execute_hook(base, options, block)
  end

  @load_hooks[name] << [block, options]
end

.run_load_hooks(name, base = Object) ⇒ Object



42
43
44
45
46
47
# File 'activesupport/lib/active_support/lazy_load_hooks.rb', line 42

def self.run_load_hooks(name, base = Object)
  @loaded[name] << base
  @load_hooks[name].each do |hook, options|
    execute_hook(base, options, hook)
  end
end

.versionObject

Returns the version of the currently loaded ActiveSupport as a Gem::Version



3
4
5
# File 'activesupport/lib/active_support/version.rb', line 3

def self.version
  Gem::Version.new "4.1.0.beta"
end