Module: Interaction
- Defined in:
- lib/interaction.rb,
lib/interaction/params.rb,
lib/interaction/version.rb
Defined Under Namespace
Modules: ClassMethods, Params, Perform, ValidationHelpers
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
-
.included(base) ⇒ Object
private
Override Ruby’s module inclusion hook to prepend base with #perform, extend base with a .perform method, and include Params for Virtus.
Instance Method Summary collapse
-
#failed? ⇒ TrueClass, FalseClass
Indicates whether the use case failed.
-
#success? ⇒ TrueClass, FalseClass
Indicates if the use case was successful.
Class Method Details
.included(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override Ruby’s module inclusion hook to prepend base with #perform, extend base with a .perform method, and include Params for Virtus.
10 11 12 13 14 15 16 |
# File 'lib/interaction.rb', line 10 def self.included(base) base.class_eval do prepend Perform extend ClassMethods include Params end end |
Instance Method Details
#failed? ⇒ TrueClass, FalseClass
Indicates whether the use case failed
70 71 72 |
# File 'lib/interaction.rb', line 70 def failed? !success? end |
#success? ⇒ TrueClass, FalseClass
Indicates if the use case was successful
60 61 62 |
# File 'lib/interaction.rb', line 60 def success? !!@success end |