1##
2# A file included at generation time.  Objects of this class are created by
3# RDoc::RD for an extension-less include.
4#
5# This implementation in incomplete.
6
7class RDoc::Markup::Include
8
9  ##
10  # The filename to be included, without extension
11
12  attr_reader :file
13
14  ##
15  # Directories to search for #file
16
17  attr_reader :include_path
18
19  ##
20  # Creates a new include that will import +file+ from +include_path+
21
22  def initialize file, include_path
23    @file = file
24    @include_path = include_path
25  end
26
27  def == other # :nodoc:
28    self.class === other and
29      @file == other.file and @include_path == other.include_path
30  end
31
32  def pretty_print q # :nodoc:
33    q.group 2, '[incl ', ']' do
34      q.text file
35      q.breakable
36      q.text 'from '
37      q.pp include_path
38    end
39  end
40
41end
42
43