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
filefrominclude_path. -
#pretty_print(q) ⇒ Object
:nodoc:.
Constructor Details
#initialize(file, include_path) ⇒ Include
Creates a new include that will import file from include_path
25 26 27 28 |
# File 'lib/rdoc/markup/include.rb', line 25 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
15 16 17 |
# File 'lib/rdoc/markup/include.rb', line 15 def file @file end |
#include_path ⇒ Object (readonly)
Directories to search for #file
20 21 22 |
# File 'lib/rdoc/markup/include.rb', line 20 def include_path @include_path end |
Instance Method Details
#==(other) ⇒ Object
:nodoc:
30 31 32 33 |
# File 'lib/rdoc/markup/include.rb', line 30 def ==(other) # :nodoc: self.class === other and @file == other.file and @include_path == other.include_path end |
#pretty_print(q) ⇒ Object
:nodoc:
35 36 37 38 39 40 41 42 |
# File 'lib/rdoc/markup/include.rb', line 35 def pretty_print(q) # :nodoc: q.group 2, '[incl ', ']' do q.text file q.breakable q.text 'from ' q.pp include_path end end |