Class: Rdux::Result
- Inherits:
-
Struct
- Object
- Struct
- Rdux::Result
- Defined in:
- lib/rdux/result.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#after_save ⇒ Object
Returns the value of attribute after_save.
-
#down_payload ⇒ Object
Returns the value of attribute down_payload.
-
#nested ⇒ Object
Returns the value of attribute nested.
-
#ok ⇒ Object
Returns the value of attribute ok.
-
#resp ⇒ Object
Returns the value of attribute resp.
-
#save ⇒ Object
Returns the value of attribute save.
-
#up_result ⇒ Object
Returns the value of attribute up_result.
Instance Method Summary collapse
- #payload ⇒ Object (also: #val)
- #save_failed? ⇒ Boolean
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def action @action end |
#after_save ⇒ Object
Returns the value of attribute after_save
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def after_save @after_save end |
#down_payload ⇒ Object
Returns the value of attribute down_payload
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def down_payload @down_payload end |
#nested ⇒ Object
Returns the value of attribute nested
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def nested @nested end |
#ok ⇒ Object
Returns the value of attribute ok
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def ok @ok end |
#resp ⇒ Object
Returns the value of attribute resp
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def resp @resp end |
#save ⇒ Object
Returns the value of attribute save
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def save @save end |
#up_result ⇒ Object
Returns the value of attribute up_result
4 5 6 |
# File 'lib/rdux/result.rb', line 4 def up_result @up_result end |
Instance Method Details
#payload ⇒ Object Also known as: val
5 6 7 |
# File 'lib/rdux/result.rb', line 5 def payload resp || down_payload end |
#save_failed? ⇒ Boolean
10 11 12 |
# File 'lib/rdux/result.rb', line 10 def save_failed? ok == false && save end |