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.
171 172 173 174 |
# File 'lib/assert/result.rb', line 171 def initialize(callback=nil) @callback = callback super() end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
169 170 171 |
# File 'lib/assert/result.rb', line 169 def callback @callback end |
Instance Method Details
#<<(result) ⇒ Object
176 177 178 179 |
# File 'lib/assert/result.rb', line 176 def <<(result) super @callback.call(result) if @callback end |