Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added getter for @sections #30

Merged
merged 2 commits into from

2 participants

@derekr

This addresses my issue #29.

Not sure if this is desired, but figured I'd send it over.

@kneath kneath merged commit d9c49b1 into kneath:master
@kneath
Owner

Looks good to me, all merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 2, 2012
  1. @derekr

    Added getter for @sections.

    derekr authored
Commits on Feb 6, 2012
  1. @derekr
This page is out of date. Refresh to see the latest.
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
@@ -111,4 +111,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
Something went wrong with that request. Please try again.