Class: Assert::Result::Set
- Inherits:
-
Array
- Object
- Array
- Assert::Result::Set
- Defined in:
- lib/assert/result.rb
Overview
Utility Classes
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
Instance Method Summary collapse
- #<<(result) ⇒ Object
-
#initialize(callback = nil) ⇒ Set
constructor
A new instance of Set.
Constructor Details
#initialize(callback = nil) ⇒ Set
Returns a new instance of Set.
170 171 172 173 |
# File 'lib/assert/result.rb', line 170 def initialize(callback=nil) @callback = callback super() end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
168 169 170 |
# File 'lib/assert/result.rb', line 168 def callback @callback end |
Instance Method Details
#<<(result) ⇒ Object
175 176 177 178 |
# File 'lib/assert/result.rb', line 175 def <<(result) super @callback.call(result) if @callback end |