Class: Retailer::WebUnblockerApi::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/retailer/web_unblocker_api.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, html: nil, status: nil, error: nil) ⇒ Result

All members default to nil so failure results can set only :error.

Parameters:

  • success (Boolean) (defaults to: nil)
  • html (String, nil) (defaults to: nil)
  • status (Integer, nil) (defaults to: nil)
  • error (String, nil) (defaults to: nil)


56
57
# File 'app/services/retailer/web_unblocker_api.rb', line 56

def initialize(success: nil, html: nil, status: nil, error: nil) = super
# @return [Boolean]

Instance Attribute Details

#errorString? (readonly)

Returns the value of attribute error

Returns:

  • (String, nil)

    the current value of error



50
51
52
# File 'app/services/retailer/web_unblocker_api.rb', line 50

def error
  @error
end

#htmlString? (readonly)

Returns the value of attribute html

Returns:

  • (String, nil)

    the current value of html



50
51
52
# File 'app/services/retailer/web_unblocker_api.rb', line 50

def html
  @html
end

#statusInteger? (readonly)

Returns the value of attribute status

Returns:

  • (Integer, nil)

    the current value of status



50
51
52
# File 'app/services/retailer/web_unblocker_api.rb', line 50

def status
  @status
end

#successBoolean (readonly)

Returns the value of attribute success

Returns:

  • (Boolean)

    the current value of success



50
51
52
# File 'app/services/retailer/web_unblocker_api.rb', line 50

def success
  @success
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


58
# File 'app/services/retailer/web_unblocker_api.rb', line 58

def success? = success