Class: Depth::Traverser
- Inherits:
-
Struct
- Object
- Struct
- Depth::Traverser
- Defined in:
- lib/depth/traverser.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
- #array? ⇒ Boolean
- #hash? ⇒ Boolean
- #next(key_or_index) ⇒ Object
- #next_or_create(key_or_index, &block) ⇒ Object
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object
2 3 4 |
# File 'lib/depth/traverser.rb', line 2 def object @object end |
Instance Method Details
#array? ⇒ Boolean
3 4 5 |
# File 'lib/depth/traverser.rb', line 3 def array? object.is_a?(Array) end |
#hash? ⇒ Boolean
7 8 9 |
# File 'lib/depth/traverser.rb', line 7 def hash? object.is_a?(Hash) end |