Class: RDoc::Markup::Include
- Inherits:
-
Object
- Object
- RDoc::Markup::Include
- Defined in:
- lib/rdoc/markup/include.rb
Overview
A file included at generation time. Objects of this class are created by RDoc::RD for an extension-less include.
This implementation in incomplete.
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
The filename to be included, without extension.
-
#include_path ⇒ Object
readonly
Directories to search for #file.
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#initialize(file, include_path) ⇒ Include
constructor
Creates a new include that will import
file
frominclude_path
. -
#pretty_print(q) ⇒ Object
:nodoc:.
Constructor Details
#initialize(file, include_path) ⇒ Include
Creates a new include that will import file
from include_path
23 24 25 26 |
# File 'lib/rdoc/markup/include.rb', line 23 def initialize file, include_path @file = file @include_path = include_path end |
Instance Attribute Details
#file ⇒ Object (readonly)
The filename to be included, without extension
13 14 15 |
# File 'lib/rdoc/markup/include.rb', line 13 def file @file end |
#include_path ⇒ Object (readonly)
Directories to search for #file
18 19 20 |
# File 'lib/rdoc/markup/include.rb', line 18 def include_path @include_path end |
Instance Method Details
#==(other) ⇒ Object
:nodoc:
28 29 30 31 |
# File 'lib/rdoc/markup/include.rb', line 28 def == other # :nodoc: self.class === other and @file == other.file and @include_path == other.include_path end |
#pretty_print(q) ⇒ Object
:nodoc:
33 34 35 36 37 38 39 40 |
# File 'lib/rdoc/markup/include.rb', line 33 def pretty_print q # :nodoc: q.group 2, '[incl ', ']' do q.text file q.breakable q.text 'from ' q.pp include_path end end |