Class: Accio::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/accio/comment.rb

Overview

Public: Represents a comment.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#textObject (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