Class: Rule::RuleParser

Inherits:
Object
  • Object
show all
Defined in:
lib/csspress/rule.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



70
71
72
73
74
75
# File 'lib/csspress/rule.rb', line 70

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

Instance Attribute Details

#declarationsObject (readonly)

:nodoc:



66
67
68
# File 'lib/csspress/rule.rb', line 66

def declarations
  @declarations
end

#nameObject (readonly)

:nodoc:



66
67
68
# File 'lib/csspress/rule.rb', line 66

def name
  @name
end