Sha256: 8ff0b72ce26fa31ee951bad29806f27e28a5d4107c25f9c90298feea8baff1b8

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

class Module

  # Removes all but the containing modules from this module's name
  def demodulize
    self.to_s.gsub(/^.*::/, '')
  end

  # indicates whether this type has a CLR type in its ancestors
  def clr_type?
    !self.to_clr_type.nil? ||
            self.included_modules.any? {|mod| !mod.to_clr_type.nil? } ||
            self.ancestors.any? { |mod| !mod.to_clr_type.nil? }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caricature-0.7.7 lib/caricature/core_ext/module.rb