Exception: CSSNative::RuleError

Inherits:
CSSError
  • Object
show all
Defined in:
lib/css-native/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = "Invalid rule type", rule: nil) ⇒ RuleError

Returns a new instance of RuleError.



9
10
11
12
13
14
15
# File 'lib/css-native/errors.rb', line 9

def initialize(msg = "Invalid rule type", rule: nil)
  if rule.nil?
    super(msg)
  else
    super("Invalid rule type '#{rule}'")
  end
end