Class: Writ
- Inherits:
-
Scrivener
- Object
- Scrivener
- Writ
- Defined in:
- lib/writ.rb,
lib/writ/version.rb
Defined Under Namespace
Classes: Outcome
Constant Summary collapse
- VERSION =
"1.0.0".freeze
Class Method Summary collapse
-
.run(*args, &block) ⇒ Object
Public: Run the command with the provided input.
Instance Method Summary collapse
-
#run ⇒ Object
Internal: Runs your business logic, and assigns the return value of this method as the Outcome’s ‘#value`.
-
#run! ⇒ Object
Internal: Perform validations, run the business logic, and generate the outcome to return.
Class Method Details
.run(*args, &block) ⇒ Object
Public: Run the command with the provided input. Any arguments will be forwarded to ‘Writ#new`.
Returns a Writ::Outcome.
8 9 10 |
# File 'lib/writ.rb', line 8 def self.run(*args, &block) new(*args, &block).run! end |
Instance Method Details
#run ⇒ Object
Internal: Runs your business logic, and assigns the return value of this method as the Outcome’s ‘#value`.
Returns an Object.
16 17 18 |
# File 'lib/writ.rb', line 16 def run fail NotImplementedError end |