Class: TomDoc::Method
- Inherits:
-
Object
- Object
- TomDoc::Method
- Defined in:
- lib/tomdoc/method.rb
Overview
A Method can be instance or class level.
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#name ⇒ Object
(also: #to_s)
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, comment = '', args = []) ⇒ Method
constructor
A new instance of Method.
- #inspect ⇒ Object
- #tomdoc ⇒ Object
Constructor Details
#initialize(name, comment = '', args = []) ⇒ Method
Returns a new instance of Method.
6 7 8 9 10 |
# File 'lib/tomdoc/method.rb', line 6 def initialize(name, comment = '', args = []) @name = name @comment = comment @args = args || [] end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
4 5 6 |
# File 'lib/tomdoc/method.rb', line 4 def args @args end |
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/tomdoc/method.rb', line 4 def comment @comment end |
#name ⇒ Object Also known as: to_s
Returns the value of attribute name.
4 5 6 |
# File 'lib/tomdoc/method.rb', line 4 def name @name end |