instance method
local_constant_names
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.0.13Signature
local_constant_names()
DEPRECATED: Use local_constants instead.
Returns the names of the constants defined locally as strings.
module M X = 1 end M.local_constant_names # => ["X"]
This method is useful for forward compatibility, since Ruby 1.8 returns constant names as strings, whereas 1.9 returns them as symbols.
Source
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 74
def local_constant_names
ActiveSupport::Deprecation.warn 'Module#local_constant_names is deprecated, use Module#local_constants instead'
local_constants.map { |c| c.to_s }
end
Defined in activesupport/lib/active_support/core_ext/module/introspection.rb line 74
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Module