Represents a comment. Comment lines begin with a semi-colon or hash.
; this is a comment # also a comment
Returns the inline comment for this line. Includes the comment separator at the beginning of the string.
In rare cases where a comment seperator appeared in the original file, but without a comment, just the seperator will be returned.
# File lib/iniparse/lines.rb, line 348 def comment @comment !~ /\S/ ? @comment_sep : super end
Returns if this line has an inline comment.
Being a Comment this will always return true, even if the comment is nil. This would be the case if the line starts with a comment seperator, but has no comment text. See spec/fixtures/smb.ini for a real-world example.
# File lib/iniparse/lines.rb, line 338 def has_comment? true end