Class: CssParser::OffsetAwareRuleSet

Inherits:
RuleSet
  • Object
show all
Defined in:
lib/css_parser/rule_set.rb

Constant Summary

Constants inherited from RuleSet

RuleSet::BACKGROUND_PROPERTIES, RuleSet::BORDER_PROPERTIES, RuleSet::BORDER_STYLE_PROPERTIES, RuleSet::DIMENSIONS, RuleSet::FONT_STYLE_PROPERTIES, RuleSet::LIST_STYLE_PROPERTIES, RuleSet::NUMBER_OF_DIMENSIONS, RuleSet::RE_ELEMENTS_AND_PSEUDO_ELEMENTS, RuleSet::RE_NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES

Instance Attribute Summary collapse

Attributes inherited from RuleSet

#selectors, #specificity

Instance Method Summary collapse

Methods inherited from RuleSet

#add_declaration!, #create_background_shorthand!, #create_border_shorthand!, #create_dimensions_shorthand!, #create_font_shorthand!, #create_list_style_shorthand!, #create_shorthand!, #create_shorthand_properties!, #declarations_to_s, #each_declaration, #each_selector, #expand_background_shorthand!, #expand_border_shorthand!, #expand_dimensions_shorthand!, #expand_font_shorthand!, #expand_list_style_shorthand!, #expand_shorthand!, #extract_background_size_from, #get_value, #remove_declaration!, #to_s

Constructor Details

#initialize(filename, offset, selectors, block, specificity = nil) ⇒ OffsetAwareRuleSet

Returns a new instance of OffsetAwareRuleSet.



526
527
528
529
530
# File 'lib/css_parser/rule_set.rb', line 526

def initialize(filename, offset, selectors, block, specificity = nil)
  super(selectors, block, specificity)
  @offset = offset
  @filename = filename
end

Instance Attribute Details

#filenameObject

the local or remote location



524
525
526
# File 'lib/css_parser/rule_set.rb', line 524

def filename
  @filename
end

#offsetObject (readonly)

File offset range



521
522
523
# File 'lib/css_parser/rule_set.rb', line 521

def offset
  @offset
end