Active Support – Rails 的工具類別和 Ruby 擴充功能
Active Support 是一組 Rails 框架中常用的工具類別和標準函式庫擴充功能。這些新增功能位於此套件中,以便在 Rails 之外的 Ruby 專案中視需要載入。
您可以在《Active Support 核心擴充功能》指南中閱讀更多關於擴充功能的資訊。
下載與安裝
最新版的 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::RaiseWarnings
- 模組 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::DelegationError
- 類別 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::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 106 def self.cache_format_version Cache.format_version end
cache_format_version=(value) 連結
原始碼:顯示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 110 def self.cache_format_version=(value) Cache.format_version = value end
eager_load!() 連結
原始碼:顯示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 94 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 114 def self.to_time_preserves_timezone DateAndTime::Compatibility.preserve_timezone end
to_time_preserves_timezone=(value) 連結
原始碼:顯示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 118 def self.to_time_preserves_timezone=(value) if !value ActiveSupport.deprecator.warn( "`to_time` will always preserve the receiver timezone rather than system local time in Rails 8.1. " \ "To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`." ) elsif value != :zone ActiveSupport.deprecator.warn( "`to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. " \ "To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`." ) end DateAndTime::Compatibility.preserve_timezone = value end
utc_to_local_returns_utc_offset_times() 連結
原始碼:顯示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 134 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 138 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