Active Support – 实用类和 Rails 的 Ruby 扩展
Active Support 是实用类和标准库扩展的集合,发现对 Rails 框架很有用。这些附加内容位于此软件包中,以便可以在 Rails 之外的 Ruby 项目中根据需要加载它们。
您可以在 Active Support Core Extensions 指南中阅读有关扩展的更多信息。
下载和安装
Active Support 的最新版本可以使用 RubyGems 安装
$ gem install activesupport
源代码可以作为 GitHub 上 Rails 项目的一部分下载
许可证
Active Support 在 MIT 许可下发布
支持
API 文档位于
Ruby on Rails 项目的错误报告可以提交到这里
功能请求应在此处的 rails-core 邮件列表中讨论
- MODULE ActiveSupport::ActionableError
- 模块 ActiveSupport::Autoload
- 模块 ActiveSupport::Benchmarkable
- 模块 ActiveSupport::Cache
- 模块 ActiveSupport::Callbacks
- 模块 ActiveSupport::CompareWithRange
- 模块 ActiveSupport::Concern
- 模块 ActiveSupport::Concurrency
- 模块 ActiveSupport::Configurable
- 模块 ActiveSupport::CoreExt
- 模块 ActiveSupport::Dependencies
- 模块 ActiveSupport::DescendantsTracker
- 模块 ActiveSupport::EnumerableCoreExt
- 模块 ActiveSupport::ForkTracker
- 模块 ActiveSupport::Gzip
- 模块 ActiveSupport::Inflector
- 模块 ActiveSupport::JSON
- 模块 ActiveSupport::LazyLoadHooks
- 模块 ActiveSupport::LoggerSilence
- 模块 ActiveSupport::MessagePack
- 模块 ActiveSupport::Messages
- 模块 ActiveSupport::Multibyte
- 模块 ActiveSupport::Notifications
- 模块 ActiveSupport::NumberHelper
- 模块 ActiveSupport::NumericWithFormat
- 模块 ActiveSupport::RangeWithFormat
- 模块 ActiveSupport::Rescuable
- 模块 ActiveSupport::SecurityUtils
- 模块 ActiveSupport::TaggedLogging
- 模块 ActiveSupport::Testing
- 模块 ActiveSupport::VERSION
- 模块 ActiveSupport::XmlMini
- 模块 ActiveSupport::XmlMini_LibXMLSAX
- 模块 ActiveSupport::XmlMini_NokogiriSAX
- 类 ActiveSupport::ArrayInquirer
- 类 ActiveSupport::BacktraceCleaner
- 类 ActiveSupport::BroadcastLogger
- 类 ActiveSupport::CachingKeyGenerator
- 类 ActiveSupport::CodeGenerator
- 类 ActiveSupport::ConfigurationFile
- 类 ActiveSupport::CurrentAttributes
- 类 ActiveSupport::Deprecation
- 类 ActiveSupport::DeprecationException
- 类 ActiveSupport::Duration
- 类 ActiveSupport::EncryptedConfiguration
- 类 ActiveSupport::EncryptedFile
- 类 ActiveSupport::ErrorReporter
- 类 ActiveSupport::EventedFileUpdateChecker
- 类 ActiveSupport::ExecutionWrapper
- 类 ActiveSupport::Executor
- 类 ActiveSupport::FileUpdateChecker
- 类 ActiveSupport::HashWithIndifferentAccess
- 类 ActiveSupport::InheritableOptions
- 类 ActiveSupport::KeyGenerator
- 类 ActiveSupport::LogSubscriber
- 类 ActiveSupport::Logger
- 类 ActiveSupport::MessageEncryptor
- 类 ActiveSupport::MessageEncryptors
- 类 ActiveSupport::MessageVerifier
- 类 ActiveSupport::MessageVerifiers
- 类 ActiveSupport::OrderedOptions
- 类 ActiveSupport::ParameterFilter
- 类 ActiveSupport::ProxyObject
- 类 ActiveSupport::Reloader
- 类 ActiveSupport::SafeBuffer
- 类 ActiveSupport::SecureCompareRotator
- 类 ActiveSupport::StringInquirer
- 类 ActiveSupport::Subscriber
- 类 ActiveSupport::TestCase
- 类 ActiveSupport::TimeWithZone
- 类 ActiveSupport::TimeZone
- 类 ActiveSupport::XMLConverter
- C
- E
- G
- T
- U
- V
类公共方法
cache_format_version() 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 104 def self.cache_format_version Cache.format_version end
cache_format_version=(value) 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 108 def self.cache_format_version=(value) Cache.format_version = value end
eager_load!() 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 92 def self.eager_load! super NumberHelper.eager_load! end
gem_version() 链接
返回当前加载的 Active Support 版本,作为 Gem::Version
。
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support/gem_version.rb, line 5 def self.gem_version Gem::Version.new VERSION::STRING end
to_time_preserves_timezone() 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 112 def self.to_time_preserves_timezone DateAndTime::Compatibility.preserve_timezone end
to_time_preserves_timezone=(value) 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 116 def self.to_time_preserves_timezone=(value) unless value ActiveSupport.deprecator.warn( "Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 7.2." ) end DateAndTime::Compatibility.preserve_timezone = value end
utc_to_local_returns_utc_offset_times() 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 126 def self.utc_to_local_returns_utc_offset_times DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times end
utc_to_local_returns_utc_offset_times=(value) 链接
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 130 def self.utc_to_local_returns_utc_offset_times=(value) DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value end
version() 链接
返回当前加载的 Active Support 版本,作为 Gem::Version
。
来源:显示 | 在 GitHub 上
# File activesupport/lib/active_support/version.rb, line 7 def self.version gem_version end