Class: Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/sleeping-wolf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#textObject

Returns the value of attribute text.



33
34
35
# File 'lib/sleeping-wolf.rb', line 33

def text
  @text
end

Instance Method Details

#to_sObject



39
40
41
# File 'lib/sleeping-wolf.rb', line 39

def to_s
	return @text
end