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.1"
Class Method Summary collapse
-
.included(base) ⇒ Object
private
Override Ruby’s module inclusion hook to prepend base with our #perform method, extend base with a .perform method, include Params for Virtus and ActiveSupport::Validation.
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 our #perform method, extend base with a .perform method, include Params for Virtus and ActiveSupport::Validation.
11 12 13 14 15 16 17 |
# File 'lib/interaction.rb', line 11 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
71 72 73 |
# File 'lib/interaction.rb', line 71 def failed? !success? end |
#success? ⇒ TrueClass, FalseClass
Indicates if the use case was successful
61 62 63 |
# File 'lib/interaction.rb', line 61 def success? !!@success end |