composable_operations 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/lib/composable_operations/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb6d4feb567aaa5715d0cc18f4ce0fa9cb657f40
|
4
|
+
data.tar.gz: 90adbd786dc02ad45e48ba828d0a9d6f205a4d19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 907056386820c76604a5cf0e9fcb99351b970b568b1fa24600a2240eaeb2a4a79db2c06fa0e3611d79a3f64591ff08e3ca3736b885f48b6fc261120a171cefdb
|
7
|
+
data.tar.gz: d5213f41b0f34e2f1e601159b836ed53e3175e78420a0da6769e3523133c4463723ff79a3e6311aeb6153328b75e34875c12e43d43c892203ea0d7ad646c7a38
|
data/README.md
CHANGED
@@ -210,7 +210,7 @@ StrictDateParser.perform("") # => ComposableOperations::OperationError: no times
|
|
210
210
|
Operations and composed operations support
|
211
211
|
[SmartProperties](http://github.com/t6d/smart_properties) to conveniently
|
212
212
|
provide additional settings upon initialization of an operation. In the
|
213
|
-
example
|
213
|
+
example below, an operation is defined that indents a given string. The indent
|
214
214
|
is set to 2 by default but can easily be changed by supplying an options hash
|
215
215
|
to the initializer.
|
216
216
|
|
@@ -231,6 +231,20 @@ end
|
|
231
231
|
Indention.perform("Hello World", indent: 4) # => " Hello World"
|
232
232
|
```
|
233
233
|
|
234
|
+
Operations that are part of an composed operation can be configured by calling
|
235
|
+
the `.use` method with a hash of options as the second argument. See the
|
236
|
+
listing below for an example.
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
class SomeComposedOperation < ComposableOperations::ComposedOperation
|
240
|
+
|
241
|
+
# ...
|
242
|
+
use Indention, indent: 4
|
243
|
+
# ...
|
244
|
+
|
245
|
+
end
|
246
|
+
```
|
247
|
+
|
234
248
|
## Contributing
|
235
249
|
|
236
250
|
1. Fork it
|