Class: JSI::JSON::ArrayNode

Inherits:
Node
  • Object
show all
Includes:
Enumerable, PathedArrayNode
Defined in:
lib/jsi/json/node.rb

Overview

a JSI::JSON::Node whose content is Array-like (responds to #to_ary) and includes Array methods from Arraylike

Constant Summary

Constants included from Arraylike

Arraylike::DESTRUCTIVE_METHODS, Arraylike::SAFE_INDEX_ELEMENT_METHODS, Arraylike::SAFE_INDEX_ONLY_METHODS, Arraylike::SAFE_METHODS

Instance Attribute Summary

Attributes inherited from Node

#document, #pointer

Instance Method Summary collapse

Methods included from PathedArrayNode

#each, #node_content_ary_pubsend, #to_ary

Methods included from Arraylike

#inspect, #pretty_print, #to_s

Methods inherited from Node

#[], #[]=, #deref, #document_node, #dup, #fingerprint, #fragment, #initialize, #inspect, #modified_copy, new_by_type, new_doc, #object_group_text, #parent_node, #path, #pointer_path, #pretty_print, #root_node?

Methods included from FingerprintHash

#==, #hash

Methods included from PathedNode

#node_content, #node_ptr_deref

Constructor Details

This class inherits a constructor from JSI::JSON::Node

Instance Method Details

#as_json(*opt) ⇒ Object

returns a jsonifiable representation of this node's content



229
230
231
# File 'lib/jsi/json/node.rb', line 229

def as_json(*opt) # needs redefined after including Enumerable
  Typelike.as_json(content, *opt)
end