Class: JSON::SchemaDsl::Renderers::Filter

Inherits:
Base
  • Object
show all
Defined in:
lib/json/schema_dsl/renderers/filter.rb

Overview

Filters out properties that are either used internally only or which are redundant (I.e. set to nil).

Constant Summary collapse

INVISIBLES =
%w[Children Nullable Name].freeze

Instance Attribute Summary

Attributes inherited from Base

#scope

Instance Method Summary collapse

Methods inherited from Base

#initialize, #traverse

Constructor Details

This class inherits a constructor from JSON::SchemaDsl::Renderers::Base

Instance Method Details

#visit(entity) ⇒ Object

Filters out properties that are either used internally only or which are redundant (I.e. set to nil).



13
14
15
# File 'lib/json/schema_dsl/renderers/filter.rb', line 13

def visit(entity)
  traverse(filter(entity))
end