Skip to content

Commit

Permalink
Merge pull request #30 from derekr/master
Browse files Browse the repository at this point in the history
Added getter for @Sections
  • Loading branch information
Kyle Neath committed Feb 7, 2012
2 parents a3df2d2 + d79a512 commit d9c49b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/kss/parser.rb
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions test/parser_test.rb
Expand Up @@ -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.