Class: ForwardMX::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Result

Returns a new instance of Result.



11
12
13
14
15
# File 'lib/ForwardMX.rb', line 11

def initialize data
  @ok = data['ok']
  @error = data['error']
  @success = @ok.nil? ? false : true
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



10
11
12
# File 'lib/ForwardMX.rb', line 10

def error
  @error
end

#okObject

Returns the value of attribute ok.



10
11
12
# File 'lib/ForwardMX.rb', line 10

def ok
  @ok
end

#successObject

Returns the value of attribute success.



10
11
12
# File 'lib/ForwardMX.rb', line 10

def success
  @success
end