Exception: Less::ParseError
- Inherits:
-
StandardError
- Object
- StandardError
- Less::ParseError
- Defined in:
- lib/less/errors.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(details) ⇒ ParseError
constructor
A new instance of ParseError.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(details) ⇒ ParseError
Returns a new instance of ParseError.
5 6 7 8 |
# File 'lib/less/errors.rb', line 5 def initialize(details) @details = YAML.load(details.gsub('=>', ':')) super(@details['message']) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
10 11 12 13 14 |
# File 'lib/less/errors.rb', line 10 def method_missing(name, *args, &block) key = name.to_s super unless @details.key?(key) @details[key] end |