Class: Array
- Inherits:
-
Object
- Object
- Array
- Includes:
- Base
- Defined in:
- lib/zkt_client/monky_patcher/array.rb
Overview
Extends the Array class with additional methods
Class Method Summary collapse
-
.wrap(object) ⇒ Array
Wraps the given object in an array.
Instance Method Summary collapse
-
#exclude?(value) ⇒ Boolean
Checks if the array excludes the given value.
Methods included from Base
Class Method Details
.wrap(object) ⇒ Array
Wraps the given object in an array.
13 14 15 16 17 18 19 |
# File 'lib/zkt_client/monky_patcher/array.rb', line 13 def self.wrap(object) if object.respond_to?(:to_a) object.to_a else [object] end end |
Instance Method Details
#exclude?(value) ⇒ Boolean
Checks if the array excludes the given value.
25 26 27 |
# File 'lib/zkt_client/monky_patcher/array.rb', line 25 def exclude?(value) !include?(value) end |