Class: StyleSheetParser::RuleParser

Inherits:
Object
  • Object
show all
Defined in:
lib/csspress/style_sheet_parser.rb

Overview

This class parses the text entered and makes the name and declarations available to the Rule that initialised it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_data) ⇒ RuleParser

Create a new RuleParser and parse raw_data



179
180
181
182
183
184
185
# File 'lib/csspress/style_sheet_parser.rb', line 179

def initialize( raw_data )
  @rule = nil
  @raw_data = raw_data
  @name = ""
  @declarations = []
  parse
end

Instance Attribute Details

#ruleObject (readonly)

:nodoc:



175
176
177
# File 'lib/csspress/style_sheet_parser.rb', line 175

def rule
  @rule
end