Exception: Celluloid::SMTP::Exception

Inherits:
Exception
  • Object
show all
Defined in:
lib/celluloid/smtp/connection/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, code, text) ⇒ Exception

Returns a new instance of Exception.



4
5
6
7
8
# File 'lib/celluloid/smtp/connection/errors.rb', line 4

def initialize(msg=nil, code, text)
  @code = code
  @text = text
  super msg
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/celluloid/smtp/connection/errors.rb', line 3

def code
  @code
end

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/celluloid/smtp/connection/errors.rb', line 3

def text
  @text
end

Instance Method Details

#resultObject



9
10
11
# File 'lib/celluloid/smtp/connection/errors.rb', line 9

def result
  "#{@code} #{@text}"
end