class CSSNative::SelectorError

Public Class Methods

new(msg = "Selector not valid", element: nil, previous: nil) click to toggle source
Calls superclass method CSSNative::RuleError::new
# File lib/css-native/errors.rb, line 35
def initialize(msg = "Selector not valid", element: nil, previous: nil)
  if element.nil? && previous.nil?
    super(msg)
  elsif previous.nil?
    super("Selector '#{element}' not valid")
  else
    super("Selector '#{element}' not valid after '#{previous}' selector part")
  end
end