Sha256: e1294cba9bc8e79543028a3b4e7d99e66aa71323f7605e1bd0c72ab0b9109be9

Contents?: true

Size: 401 Bytes

Versions: 9

Compression:

Stored size: 401 Bytes

Contents

module SoberSwag
  module Nodes
    ##
    # Objects might have attribute keys, so they're
    # basically a list of attributes.
    class Object < SoberSwag::Nodes::Array
      ##
      # @return [Hash{Symbol => Array<SoberSwag::Nodes::Attribute>}]
      #   the attributes, wrapped in an `attributes:` key.
      def deconstruct_keys(_)
        { attributes: @elements }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sober_swag-0.25.2 lib/sober_swag/nodes/object.rb
sober_swag-0.25.1 lib/sober_swag/nodes/object.rb
sober_swag-0.25.0 lib/sober_swag/nodes/object.rb
sober_swag-0.24.1 lib/sober_swag/nodes/object.rb
sober_swag-0.24.0 lib/sober_swag/nodes/object.rb
sober_swag-0.23.0 lib/sober_swag/nodes/object.rb
sober_swag-0.22.0 lib/sober_swag/nodes/object.rb
sober_swag-0.21.0 lib/sober_swag/nodes/object.rb
sober_swag-0.20.0 lib/sober_swag/nodes/object.rb