Class: SoberSwag::Nodes::Object

Inherits:
Array show all
Defined in:
lib/sober_swag/nodes/object.rb

Overview

Objects might have attribute keys, so they're basically a list of attributes.

Instance Attribute Summary

Attributes inherited from Array

#elements

Instance Method Summary collapse

Methods inherited from Array

#cata, #deconstruct, #initialize, #map

Methods inherited from Base

#<=>, #cata, #eql?, #hash, #map

Constructor Details

This class inherits a constructor from SoberSwag::Nodes::Array

Instance Method Details

#deconstruct_keys(_) ⇒ Hash{Symbol => Array<SoberSwag::Nodes::Attribute>}

Returns the attributes, wrapped in an attributes: key.

Returns:



10
11
12
# File 'lib/sober_swag/nodes/object.rb', line 10

def deconstruct_keys(_)
  { attributes: @elements }
end