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 郵件列表中討論
- 模組 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