class Stylesheet::CssCharsetRule
Attributes
encoding[R]
Public Class Methods
matches_rule?(text)
click to toggle source
# File lib/stylesheet/css_charset_rule.rb, line 10 def self.matches_rule?(text) text.include?("@charset") end
Public Instance Methods
type()
click to toggle source
# File lib/stylesheet/css_charset_rule.rb, line 6 def type CssRule::CHARSET_RULE end
Private Instance Methods
encoding=(encoding)
click to toggle source
# File lib/stylesheet/css_charset_rule.rb, line 16 def encoding=(encoding) @encoding = encoding.gsub(/["']+/, "") end
parse_css_text()
click to toggle source
# File lib/stylesheet/css_charset_rule.rb, line 20 def parse_css_text selector, self.encoding = css_text.gsub(";", "").split(" ", 2) end