Class: RDocF95::Attr
- Inherits:
-
CodeObject
- Object
- CodeObject
- RDocF95::Attr
- Defined in:
- lib/rdoc-f95/code_objects.rb
Overview
Represent attributes
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#rw ⇒ Object
Returns the value of attribute rw.
-
#text ⇒ Object
Returns the value of attribute text.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
Attributes inherited from CodeObject
#comment, #document_children, #document_self, #done_documenting, #force_documentation, #parent, #section, #viewer
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(text, name, rw, comment) ⇒ Attr
constructor
A new instance of Attr.
- #to_s ⇒ Object
Methods inherited from CodeObject
attr_overridable, #remove_classes_and_modules, #remove_methods_etc, #start_doc, #stop_doc
Constructor Details
#initialize(text, name, rw, comment) ⇒ Attr
Returns a new instance of Attr.
733 734 735 736 737 738 739 740 |
# File 'lib/rdoc-f95/code_objects.rb', line 733 def initialize(text, name, rw, comment) super() @text = text @name = name @rw = rw @visibility = :public self.comment = comment end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
731 732 733 |
# File 'lib/rdoc-f95/code_objects.rb', line 731 def name @name end |
#rw ⇒ Object
Returns the value of attribute rw.
731 732 733 |
# File 'lib/rdoc-f95/code_objects.rb', line 731 def rw @rw end |
#text ⇒ Object
Returns the value of attribute text.
731 732 733 |
# File 'lib/rdoc-f95/code_objects.rb', line 731 def text @text end |
#visibility ⇒ Object
Returns the value of attribute visibility.
731 732 733 |
# File 'lib/rdoc-f95/code_objects.rb', line 731 def visibility @visibility end |
Instance Method Details
#<=>(other) ⇒ Object
746 747 748 |
# File 'lib/rdoc-f95/code_objects.rb', line 746 def <=>(other) self.name <=> other.name end |
#to_s ⇒ Object
742 743 744 |
# File 'lib/rdoc-f95/code_objects.rb', line 742 def to_s "attr: #{self.name} #{self.rw}\n#{self.comment}" end |