Exception: LocaSMS::Exception

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/locasms/exception.rb

Overview

Common base exception

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Exception

Returns a new instance of Exception.



8
9
10
11
12
13
# File 'lib/locasms/exception.rb', line 8

def initialize(data = {})
  @raw    = data[:raw]
  @action = data[:data]

  super data[:message] || default_message
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



6
7
8
# File 'lib/locasms/exception.rb', line 6

def action
  @action
end

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/locasms/exception.rb', line 6

def raw
  @raw
end

Instance Method Details

#default_messageObject (private)



17
18
19
# File 'lib/locasms/exception.rb', line 17

def default_message
  nil
end