Exception: Dynectastic::DynectError
- Inherits:
-
Exception
- Object
- Exception
- Dynectastic::DynectError
- Defined in:
- lib/dynectastic/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, source, code) ⇒ DynectError
constructor
A new instance of DynectError.
- #message ⇒ Object
Constructor Details
#initialize(text, source, code) ⇒ DynectError
Returns a new instance of DynectError.
7 8 9 |
# File 'lib/dynectastic/errors.rb', line 7 def initialize(text, source, code) @text, @source, @code = text, source, code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/dynectastic/errors.rb', line 5 def code @code end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/dynectastic/errors.rb', line 5 def source @source end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/dynectastic/errors.rb', line 5 def text @text end |
Instance Method Details
#message ⇒ Object
11 12 13 |
# File 'lib/dynectastic/errors.rb', line 11 def %Q[#{ text }. (SOURCE: #{ source}; CODE: #{ code })] end |