Class: SmsAero2::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/sms_aero2/result.rb

Direct Known Subclasses

HlrResult

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Result

Returns a new instance of Result.



5
6
7
# File 'lib/sms_aero2/result.rb', line 5

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/sms_aero2/result.rb', line 3

def response
  @response
end

Instance Method Details

#dataObject



17
18
19
# File 'lib/sms_aero2/result.rb', line 17

def data
  response.fetch('data')
end

#reasonObject



13
14
15
# File 'lib/sms_aero2/result.rb', line 13

def reason
  response.fetch('message')
end

#success?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/sms_aero2/result.rb', line 9

def success?
  response.fetch('success')
end