Class: UserPlane::Command
- Inherits:
-
Imperator::Command
- Object
- Imperator::Command
- UserPlane::Command
- Includes:
- ActiveModel::Conversion
- Defined in:
- lib/user_plane/command.rb
Direct Known Subclasses
User::ConfirmEmailAddress, User::ResetPassword, User::SendPasswordReset, User::SendSignUpInvite, User::SignIn, User::SignUp, User::UpdateDetails
Instance Method Summary collapse
- #perform(options = {}) ⇒ Object
- #perform!(options = {}) ⇒ Object
-
#perform_validations(options = {}) ⇒ Object
:nodoc:.
Instance Method Details
#perform(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/user_plane/command.rb', line 11 def perform(={}) if perform_validations() super() true else false end end |
#perform!(options = {}) ⇒ Object
20 21 22 |
# File 'lib/user_plane/command.rb', line 20 def perform!(={}) raise Imperator::InvalidCommandError.new("Command was invalid") unless perform() end |
#perform_validations(options = {}) ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/user_plane/command.rb', line 7 def perform_validations(={}) # :nodoc: [:validate] == false || valid? end |