Sha256: ecdc415682552183bda9767690b4d428eea0c8291a7e2b20b6f8625f5a772379

Contents?: true

Size: 411 Bytes

Versions: 9

Compression:

Stored size: 411 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 is_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

9 entries across 9 versions & 2 rubygems

Version Path
casualjim-caricature-0.5.0 lib/core_ext/module.rb
casualjim-caricature-0.6.0 lib/core_ext/module.rb
casualjim-caricature-0.6.1 lib/core_ext/module.rb
caricature-0.7.1 lib/core_ext/module.rb
caricature-0.7.0 lib/core_ext/module.rb
caricature-0.6.3 lib/core_ext/module.rb
caricature-0.6.0 lib/core_ext/module.rb
caricature-0.6.1 lib/core_ext/module.rb
caricature-0.5.0 lib/core_ext/module.rb