Exception: Curlybars::Error::Base
- Inherits:
-
StandardError
- Object
- StandardError
- Curlybars::Error::Base
- Defined in:
- lib/curlybars/error/base.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(id, message, position, metadata = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(id, message, position, metadata = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/curlybars/error/base.rb', line 6 def initialize(id, , position, = {}) super() @id = id @position = position @metadata = return if position.nil? return if position.file_name.nil? location = "%s:%d:%d" % [position.file_name, position.line_number, position.line_offset] set_backtrace([location]) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/curlybars/error/base.rb', line 4 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/curlybars/error/base.rb', line 4 def @metadata end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
4 5 6 |
# File 'lib/curlybars/error/base.rb', line 4 def position @position end |