Class: Faye::Error
- Inherits:
-
Object
- Object
- Faye::Error
- Defined in:
- lib/faye/error.rb
Constant Summary collapse
- VERSION_MISMATCH =
[300, 'Version mismatch']
- CONNTYPE_MISMATCH =
[301, 'Connection types not supported']
- EXT_MISMATCH =
[302, 'Extension mismatch']
- BAD_REQUEST =
[400, 'Bad request']
- CLIENT_UNKNOWN =
[401, 'Unknown client']
- PARAMETER_MISSING =
[402, 'Missing required parameter']
- CHANNEL_FORBIDDEN =
[403, 'Forbidden channel']
- CHANNEL_UNKNOWN =
[404, 'Unknown channel']
- CHANNEL_INVALID =
[405, 'Invalid channel']
- EXT_UNKNOWN =
[406, 'Unknown extension']
- PUBLISH_FAILED =
[407, 'Failed to publish']
- SERVER_ERROR =
[500, 'Internal server error']
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, params, message) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(code, params, message) ⇒ Error
Returns a new instance of Error.
23 24 25 26 27 |
# File 'lib/faye/error.rb', line 23 def initialize(code, params, ) @code = code @params = params @message = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
21 22 23 |
# File 'lib/faye/error.rb', line 21 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
21 22 23 |
# File 'lib/faye/error.rb', line 21 def @message end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
21 22 23 |
# File 'lib/faye/error.rb', line 21 def params @params end |
Class Method Details
.method_missing(type, *args) ⇒ Object
4 5 6 7 |
# File 'lib/faye/error.rb', line 4 def self.method_missing(type, *args) code = const_get(type.to_s.upcase) new(code[0], args, code[1]).to_s end |
Instance Method Details
#to_s ⇒ Object
29 30 31 |
# File 'lib/faye/error.rb', line 29 def to_s "#{ @code }:#{ @params * ',' }:#{ @message }" end |