Skip to content

Commit 13e39cd

Browse files
committed
Usage tweaks
1 parent 0de5aed commit 13e39cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ gem 'operatic'
1414

1515
## Usage
1616

17-
An Operatic class encapsulates an operation and communicates the status of the operation via its result object. As well as being either a `#success?` or a `#failure?` further data can be attached via `#success!`, `#failure!` or convenience accessors.
17+
An Operatic class encapsulates an operation and communicates its status via a result object. As well as being a `#success?` or `#failure?` data can also be attached to the result via `#success!`, `#failure!`, or during the operation's execution.
1818

1919
```ruby
2020
class SayHello
2121
include Operatic
2222

23-
# Readers for attributes passed via `.call`.
23+
# Readers for instance variables defined in `.call`.
2424
attr_reader :name
2525

26-
# Declare convenience accessors on the result.
26+
# Declare convenience data accessors.
2727
data_attr :message
2828

2929
def call
30-
# Exit the method and mark the result as a failure.
30+
# Exit the method and mark the operation as a failure.
3131
return failure! unless name
3232

33-
# Mark the result as a success and attach further data.
33+
# Mark the operation as a success and attach further data.
3434
success!(message: "Hello #{name}")
3535
end
3636
end

0 commit comments

Comments
 (0)