Class: Contai::Providers::Base::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/contai/providers/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success:, content: nil, error: nil) ⇒ Result

Returns a new instance of Result.



25
26
27
28
29
# File 'lib/contai/providers/base.rb', line 25

def initialize(success:, content: nil, error: nil)
  @success = success
  @content = content
  @error = error
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



23
24
25
# File 'lib/contai/providers/base.rb', line 23

def content
  @content
end

#errorObject (readonly)

Returns the value of attribute error.



23
24
25
# File 'lib/contai/providers/base.rb', line 23

def error
  @error
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/contai/providers/base.rb', line 31

def success?
  @success
end