Class: JsDuck::Css::Parser
- Inherits:
-
Object
- Object
- JsDuck::Css::Parser
- Defined in:
- lib/jsduck/css/parser.rb
Overview
Parses SCSS using the official SASS parser.
Constant Summary collapse
- TYPE =
Css::Type.new
Instance Method Summary collapse
-
#initialize(input, options = {}) ⇒ Parser
constructor
A new instance of Parser.
-
#parse ⇒ Object
Returns an array of docsets like the Js::Parser does.
Constructor Details
#initialize(input, options = {}) ⇒ Parser
Returns a new instance of Parser.
11 12 13 14 |
# File 'lib/jsduck/css/parser.rb', line 11 def initialize(input, = {}) @input = input @docs = [] end |
Instance Method Details
#parse ⇒ Object
Returns an array of docsets like the Js::Parser does.
17 18 19 20 21 |
# File 'lib/jsduck/css/parser.rb', line 17 def parse root = Sass::Engine.new(@input, :syntax => :scss).to_tree find_doc_comments(root.children) @docs end |