Class: Reform::Form::Call::Result

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/reform/form/call.rb

Overview

TODO: the result object might soon come from dry.

Instance Method Summary collapse

Constructor Details

#initialize(success, data) ⇒ Result

Returns a new instance of Result.



10
11
12
13
# File 'lib/reform/form/call.rb', line 10

def initialize(success, data)
  @success = success
  super(data)
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/reform/form/call.rb', line 19

def failure?
  !@success
end

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/reform/form/call.rb', line 15

def success?
  @success
end