Class: Schemacop::V3::IntegerNode

Inherits:
NumericNode show all
Defined in:
lib/schemacop/v3/integer_node.rb

Constant Summary

Constants inherited from NumericNode

NumericNode::ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Node

#as, #default, #description, #name, #options, #parent, #require_key, #title

Instance Method Summary collapse

Methods inherited from NumericNode

#_validate, allowed_options, #process_json, #validate_self

Methods inherited from Node

allowed_options, #cast, #children, create, #create, dsl_methods, #dsl_node, #dsl_scm, #init, #initialize, #require_key?, #required?, resolve_class, #schemas, supports_children, supports_children_options, #used_external_schemas, #validate

Constructor Details

This class inherits a constructor from Schemacop::V3::Node

Instance Method Details

#allowed_typesObject



8
9
10
# File 'lib/schemacop/v3/integer_node.rb', line 8

def allowed_types
  { Integer => :integer }
end

#as_jsonObject



4
5
6
# File 'lib/schemacop/v3/integer_node.rb', line 4

def as_json
  process_json(ATTRIBUTES, type: :integer)
end