提交 84c0f73c 编写于 作者: R Robin Dupret

Refer to the library name instead of the constant

When we are loading a component and we want to know its version, we are
actually not speaking about the constant but the library itself.

[ci skip]

[Godfrey Chan & Xavier Noria]
上级 4c917dae
module ActionMailer
# Returns the version of the currently loaded ActionMailer as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActionPack
# Returns the version of the currently loaded ActionPack as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Action Pack as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActionView
# Returns the version of the currently loaded ActionView as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Action View as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActiveJob
# Returns the version of the currently loaded ActiveJob as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Active Job as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActiveModel
# Returns the version of the currently loaded ActiveModel as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Active Model as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActiveRecord
# Returns the version of the currently loaded ActiveRecord as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Active Record as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
module ActiveSupport
# Returns the version of the currently loaded ActiveSupport as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded Active Support as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册