Class: Accio::Comment
- Inherits:
-
Object
- Object
- Accio::Comment
- Defined in:
- lib/accio/comment.rb
Overview
Public: Represents a comment.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#add(text) ⇒ Object
Public: Adds text to the comment text.
-
#initialize(text) ⇒ Comment
constructor
Public: Constructor.
Constructor Details
#initialize(text) ⇒ Comment
Public: Constructor.
text - The comment text.
9 10 11 |
# File 'lib/accio/comment.rb', line 9 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/accio/comment.rb', line 4 def text @text end |
Instance Method Details
#add(text) ⇒ Object
Public: Adds text to the comment text.
text - The comment text.
16 17 18 |
# File 'lib/accio/comment.rb', line 16 def add(text) @text << text end |