Class: NilClass
- Inherits:
-
Object
- Object
- NilClass
- Defined in:
- lib/ripe/blocks/block.rb
Overview
NilClass
is monkey-patched+ to provide syntactic sugar for Block#| and Block#
+ by treating nil
like an empty block.
Instance Method Summary collapse
-
#+(block) ⇒ Block
If attempting to compose a new block with a
nil
element, ignore thenil
element. -
#|(block) ⇒ Block
If attempting to compose a new block with a
nil
element, ignore thenil
element.
Instance Method Details
#+(block) ⇒ Block
If attempting to compose a new block with a nil
element, ignore the nil
element.
140 141 142 |
# File 'lib/ripe/blocks/block.rb', line 140 def +(block) self.|(block) end |