Browse files

Merge pull request #30 from derekr/master

Added getter for @sections
  • Loading branch information...
2 parents a3df2d2 + d79a512 commit d9c49b17a819a15e8a060920ba4f8365af819f4e @kneath committed Feb 6, 2012
Showing with 8 additions and 1 deletion.
  1. +4 −1 lib/kss/parser.rb
  2. +4 −0 test/parser_test.rb
View
5 lib/kss/parser.rb
@@ -2,7 +2,10 @@ module Kss
# Public: The main KSS parser. Takes a directory full of SASS / SCSS / CSS
# files and parses the KSS within them.
class Parser
-
+
+ # Public: Returns a hash of Sections.
+ attr_accessor :sections
+
# Public: Initializes a new parser based on a directory of files. Scans
# within the directory recursively for any comment blocks that look like
# KSS.
View
4 test/parser_test.rb
@@ -100,4 +100,8 @@ def setup
assert_equal "Your standard text input box.", @sass_parsed.section('3.0.1').description
end
+ test "public sections returns hash of sections" do
+ assert_equal 2, @css_parsed.sections.count
+ end
+
end

0 comments on commit d9c49b1

Please sign in to comment.