Sha256: 9908d23ba8e81f027686fcf42ca4d24c6c1618ea46325fb0980acea790985691

Contents?: true

Size: 641 Bytes

Versions: 311

Compression:

Stored size: 641 Bytes

Contents

require 'active_support/core_ext/object/blank'

class Module
  # A module may or may not have a name.
  #
  #   module M; end
  #   M.name # => "M"
  #
  #   m = Module.new
  #   m.name # => ""
  #
  # A module gets a name when it is first assigned to a constant. Either
  # via the +module+ or +class+ keyword or by an explicit assignment:
  #
  #   m = Module.new # creates an anonymous module
  #   M = m          # => m gets a name here as a side-effect
  #   m.name         # => "M"
  #
  def anonymous?
    # Uses blank? because the name of an anonymous class is an empty
    # string in 1.8, and nil in 1.9.
    name.blank?
  end
end

Version data entries

311 entries across 267 versions & 27 rubygems

Version Path
activesupport-3.0.19 lib/active_support/core_ext/module/anonymous.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/core_ext/module/anonymous.rb
challah-0.9.0 vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
activesupport-3.2.10 lib/active_support/core_ext/module/anonymous.rb
activesupport-3.1.9 lib/active_support/core_ext/module/anonymous.rb
activesupport-3.0.18 lib/active_support/core_ext/module/anonymous.rb
classiccms-0.6.9 vendor/bundle/gems/activesupport-3.2.3/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
jquery_regex-0.0.1 vendor/bundle/gems/activesupport-3.2.9/lib/active_support/core_ext/module/anonymous.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/core_ext/module/anonymous.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/core_ext/module/anonymous.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/core_ext/module/anonymous.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/activesupport-3.2.7/lib/active_support/core_ext/module/anonymous.rb