Exception: Haml::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Haml::Error
- Defined in:
- lib/haml/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#line ⇒ Fixnum
readonly
The line of the template on which the error occurred.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message = nil, line = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, line = nil) ⇒ Error
Returns a new instance of Error.
49 50 51 52 |
# File 'lib/haml/error.rb', line 49
def initialize(message = nil, line = nil)
super(message)
@line = line
end
|
Instance Attribute Details
#line ⇒ Fixnum (readonly)
The line of the template on which the error occurred.
45 46 47 |
# File 'lib/haml/error.rb', line 45
def line
@line
end
|
Class Method Details
.message(key, *args)
37 38 39 40 |
# File 'lib/haml/error.rb', line 37
def self.message(key, *args)
string = MESSAGES[key] or raise "[HAML BUG] No error messages for #{key}"
(args.empty? ? string : string % args).rstrip
end
|