Sha256: f26fec99278ad76e64fe60a5d9e052293b7a0fe199322a452e8c6e9c9ff5c86a

Contents?: true

Size: 631 Bytes

Versions: 9

Compression:

Stored size: 631 Bytes

Contents

require 'rdoc/code_object'

##
# A Module include in a class with \#include

class RDoc::Include < RDoc::CodeObject

  ##
  # Name of included module

  attr_accessor :name

  ##
  # Creates a new Include for +name+ with +comment+

  def initialize(name, comment)
    super()
    @name = name
    self.comment = comment
  end

  def inspect # :nodoc:
    "#<%s:0x%x %s.include %s>" % [
      self.class,
      object_id,
      parent_name, @name,
    ]
  end

  ##
  # Attempts to locate the included module object.  Returns the name if not
  # known.

  def module
    RDoc::TopLevel.find_module_named(@name) || @name
  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
voloko-sdoc-0.1.3 rdoc/lib/rdoc/include.rb
voloko-sdoc-0.1.4 rdoc/lib/rdoc/include.rb
voloko-sdoc-0.1.5 rdoc/lib/rdoc/include.rb
voloko-sdoc-0.1.6 rdoc/lib/rdoc/include.rb
voloko-sdoc-0.1.7 rdoc/lib/rdoc/include.rb
rdoc-2.4.1 lib/rdoc/include.rb
rdoc-2.4.2 lib/rdoc/include.rb
rdoc-2.4.0 lib/rdoc/include.rb
rdoc-2.4.3 lib/rdoc/include.rb