lib/blood_contracts/ext/refined.rb in blood_contracts-ext-0.1.0 vs lib/blood_contracts/ext/refined.rb in blood_contracts-ext-0.1.1
- old
+ new
@@ -25,17 +25,29 @@
#
def or_a(other_type)
BC::Ext::Sum.new(self, other_type)
end
+ # Alias for Sum compose
+ # See #or_a
+ alias or_an or_a
+
+ # Alias for Sum compose
+ # See #or_a
+ alias | or_a
+
# Compose types in a Pipe check
# Pipe passes data from type to type sequentially
#
# @return [BC::Pipe]
#
def and_then(other_type)
BC::Ext::Pipe.new(self, other_type)
end
+
+ # Alias for Pipe compose
+ # See #and_then
+ alias > and_then
# @private
def inherited(new_klass)
new_klass.failure_klass ||= failure_klass
new_klass.prepend ExceptionHandling