Exception: Less::ParseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/less/errors.rb

Overview

:nodoc:

Instance Method Summary collapse

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