Class: Comment
- Inherits:
-
Object
- Object
- Comment
- Defined in:
- lib/sleeping-wolf.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(comment = nil) ⇒ Comment
constructor
A new instance of Comment.
- #to_s ⇒ Object
Constructor Details
#initialize(comment = nil) ⇒ Comment
Returns a new instance of Comment.
35 36 37 |
# File 'lib/sleeping-wolf.rb', line 35 def initialize(comment=nil) @text = comment.comment if !comment.nil? end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
33 34 35 |
# File 'lib/sleeping-wolf.rb', line 33 def text @text end |
Instance Method Details
#to_s ⇒ Object
39 40 41 |
# File 'lib/sleeping-wolf.rb', line 39 def to_s return @text end |