123456789_123456789_123456789_123456789_123456789_

Class: RDoc::Markup::Include

Relationships & Source Files
Inherits: Object
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.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(file, include_path) ⇒ Include

Creates a new include that will import #file from #include_path

[ GitHub ]

  
# File 'lib/rdoc/markup/include.rb', line 23

def initialize file, include_path
  @file = file
  @include_path = include_path
end

Instance Attribute Details

#file (readonly)

The filename to be included, without extension

[ GitHub ]

  
# File 'lib/rdoc/markup/include.rb', line 13

attr_reader :file

#include_path (readonly)

Directories to search for #file

[ GitHub ]

  
# File 'lib/rdoc/markup/include.rb', line 18

attr_reader :include_path

Instance Method Details

#==(other)

This method is for internal use only.
[ GitHub ]

  
# 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)

This method is for internal use only.
[ GitHub ]

  
# 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