Class: RDoc::Require
- Inherits:
-
CodeObject
- Object
- CodeObject
- RDoc::Require
- Defined in:
- lib/rdoc/code_object/require.rb
Overview
A file loaded by #require
Constant Summary
Constants included from Text
Text::MARKUP_FORMAT, Text::SPACE_SEPARATED_LETTER_CLASS
Instance Attribute Summary collapse
-
#name ⇒ Object
Name of the required file.
Attributes inherited from CodeObject
#comment, #document_children, #document_self, #done_documenting, #file, #force_documentation, #line, #metadata, #mixin_from, #parent, #received_nodoc, #section, #store
Attributes included from Text
Instance Method Summary collapse
-
#initialize(name, comment) ⇒ Require
constructor
Creates a new Require that loads
namewithcomment. -
#inspect ⇒ Object
:nodoc:.
-
#to_s ⇒ Object
:nodoc:.
Methods inherited from CodeObject
#display?, #documented?, #file_name, #full_name=, #ignore, #ignored?, #initialize_visibility, #options, #parent_name, #record_location, #start_doc, #stop_doc, #suppress, #suppressed?
Methods included from Generator::Markup
#aref_to, #as_href, #canonical_url, #cvs_url, #description, #formatter
Methods included from Text
decode_legacy_label, expand_tabs, #flush_left, #markup, #normalize_comment, #parse, #snippet, #strip_hashes, #strip_newlines, #strip_stars, to_anchor, #wrap
Constructor Details
#initialize(name, comment) ⇒ Require
Creates a new Require that loads name with comment
16 17 18 19 20 |
# File 'lib/rdoc/code_object/require.rb', line 16 def initialize(name, comment) super() @name = name.gsub(/'|"/, "") self.comment = comment end |
Instance Attribute Details
#name ⇒ Object
Name of the required file
11 12 13 |
# File 'lib/rdoc/code_object/require.rb', line 11 def name @name end |
Instance Method Details
#inspect ⇒ Object
:nodoc:
22 23 24 25 26 27 28 29 |
# File 'lib/rdoc/code_object/require.rb', line 22 def inspect # :nodoc: "#<%s:0x%x require '%s' in %s>" % [ self.class, object_id, @name, @parent ? @parent.base_name : '(unknown)' ] end |
#to_s ⇒ Object
:nodoc:
31 32 33 |
# File 'lib/rdoc/code_object/require.rb', line 31 def to_s # :nodoc: "require #{name} in: #{parent}" end |