Class: RDocF95::Alias
- Inherits:
-
CodeObject
- Object
- CodeObject
- RDocF95::Alias
- Defined in:
- lib/rdoc-f95/code_objects.rb
Overview
Represent an alias, which is an old_name/ new_name pair associated with a particular context
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#new_name ⇒ Object
Returns the value of attribute new_name.
-
#old_name ⇒ Object
Returns the value of attribute old_name.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from CodeObject
#document_children, #document_self, #done_documenting, #force_documentation, #parent, #section, #viewer
Instance Method Summary collapse
-
#initialize(text, old_name, new_name, comment) ⇒ Alias
constructor
A new instance of Alias.
- #to_s ⇒ Object
Methods inherited from CodeObject
attr_overridable, #remove_classes_and_modules, #remove_methods_etc, #start_doc, #stop_doc
Constructor Details
#initialize(text, old_name, new_name, comment) ⇒ Alias
Returns a new instance of Alias.
704 705 706 707 708 709 710 |
# File 'lib/rdoc-f95/code_objects.rb', line 704 def initialize(text, old_name, new_name, comment) super() @text = text @old_name = old_name @new_name = new_name self.comment = comment end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
702 703 704 |
# File 'lib/rdoc-f95/code_objects.rb', line 702 def comment @comment end |
#new_name ⇒ Object
Returns the value of attribute new_name.
702 703 704 |
# File 'lib/rdoc-f95/code_objects.rb', line 702 def new_name @new_name end |
#old_name ⇒ Object
Returns the value of attribute old_name.
702 703 704 |
# File 'lib/rdoc-f95/code_objects.rb', line 702 def old_name @old_name end |
#text ⇒ Object
Returns the value of attribute text.
702 703 704 |
# File 'lib/rdoc-f95/code_objects.rb', line 702 def text @text end |
Instance Method Details
#to_s ⇒ Object
712 713 714 |
# File 'lib/rdoc-f95/code_objects.rb', line 712 def to_s "alias: #{self.old_name} -> #{self.new_name}\n#{self.comment}" end |