Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kneath committed Feb 6, 2012
1 parent 4a80aec commit a293903
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/kss/comment_parser.rb
Expand Up @@ -6,7 +6,7 @@ module Kss
# /* Multi-line style. */
class CommentParser

# Is this a single-line comment? // This style
# Public: Is this a single-line comment? // This style
#
# line - A String of one line of text.
#
Expand All @@ -15,7 +15,7 @@ def self.single_line_comment?(line)
!!(line =~ /^\s*\/\//)
end

# Is this the start of a multi-line comment? /* This style */
# Public: Is this the start of a multi-line comment? /* This style */
#
# line - A String of one line of text.
#
Expand All @@ -24,7 +24,7 @@ def self.start_multi_line_comment?(line)
!!(line =~ /^\s*\/\*/)
end

# Is this the end of a multi-line comment? /* This style */
# Public: Is this the end of a multi-line comment? /* This style */
#
# line - A String of one line of text.
#
Expand All @@ -34,7 +34,7 @@ def self.end_multi_line_comment?(line)
!!(line =~ /.*\*\//)
end

# Removes comment identifiers for single-line comments.
# Public: Removes comment identifiers for single-line comments.
#
# line - A String of one line of text.
#
Expand All @@ -44,7 +44,7 @@ def self.parse_single_line(line)
cleaned.rstrip
end

# Remove comment identifiers for multi-line comments.
# Public: Remove comment identifiers for multi-line comments.
#
# line - A String of one line of text.
#
Expand Down Expand Up @@ -81,6 +81,9 @@ def blocks
end


# Parse the file for comment blocks and populate them into @blocks.
#
# Returns an Array of parsed comment Strings.
def parse_blocks
File.open @file_path do |file|
current_block = nil
Expand Down

0 comments on commit a293903

Please sign in to comment.