Class: RDocF95::Alias

Inherits:
CodeObject show all
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

Attributes inherited from CodeObject

#document_children, #document_self, #done_documenting, #force_documentation, #parent, #section, #viewer

Instance Method Summary collapse

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

#commentObject

Returns the value of attribute comment


702
703
704
# File 'lib/rdoc-f95/code_objects.rb', line 702

def comment
  @comment
end

#new_nameObject

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_nameObject

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

#textObject

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_sObject


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