Class: DeepStruct::ArrayWrapper
- Inherits:
-
DeepWrapper
- Object
- DeepWrapper
- DeepStruct::ArrayWrapper
- Includes:
- Enumerable
- Defined in:
- lib/deepstruct.rb
Instance Method Summary collapse
- #each ⇒ Object
- #size ⇒ Object (also: #length)
Methods inherited from DeepWrapper
#[], #[]=, #initialize, #inspect, #to_json, #unwrap
Constructor Details
This class inherits a constructor from DeepStruct::DeepWrapper
Instance Method Details
#each ⇒ Object
85 86 87 88 89 |
# File 'lib/deepstruct.rb', line 85 def each block_given? or return enum_for(__method__) @value.each { |o| yield(DeepStruct.wrap(o)) } self end |
#size ⇒ Object Also known as: length
91 92 93 |
# File 'lib/deepstruct.rb', line 91 def size @value.size end |