Class: Stitches::Error
- Inherits:
-
Object
- Object
- Stitches::Error
- Defined in:
- lib/stitches/error.rb
Defined Under Namespace
Classes: MissingParameter
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(options = {}) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/stitches/error.rb', line 4 def initialize( = {}) [:code, :message].each do |key| unless .has_key?(key) raise MissingParameter.new(self.class,key) end end @code = [:code] @message = [:message] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/stitches/error.rb', line 3 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/stitches/error.rb', line 3 def @message end |