Class: AgentXmpp::Error

Inherits:
Object show all
Defined in:
lib/agent_xmpp/client/response.rb

Overview


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, *args) ⇒ Error

.….….….….….….….….….….….….….….….….….….….….….….….….….….



42
43
44
45
# File 'lib/agent_xmpp/client/response.rb', line 42

def initialize(error, *args)
  @error = error.to_sym
  @args = args
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object

.….….….….….….….….….….….….….….….….….….….….….….….….….….



53
54
55
# File 'lib/agent_xmpp/client/response.rb', line 53

def method_missing(meth, *args, &blk)
  message.send(meth, *args, &blk)
end

Instance Attribute Details

#argsObject (readonly)

.….….….….….….….….….….….….….….….….….….….….….….….….….….



39
40
41
# File 'lib/agent_xmpp/client/response.rb', line 39

def args
  @args
end

#errorObject (readonly)

.….….….….….….….….….….….….….….….….….….….….….….….….….….



39
40
41
# File 'lib/agent_xmpp/client/response.rb', line 39

def error
  @error
end

Instance Method Details

#responceObject

.….….….….….….….….….….….….….….….….….….….….….….….….….….



48
49
50
# File 'lib/agent_xmpp/client/response.rb', line 48

def responce
  Xmpp::ErrorResponse.send(error, *args)
end