Class: SexyJSONSchemas::Properties::Union

Inherits:
Base
  • Object
show all
Defined in:
lib/sexy_json_schemas/properties/union.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#as_json

Constructor Details

#initialize(name, types, *args) ⇒ Union

Returns a new instance of Union.



4
5
6
7
# File 'lib/sexy_json_schemas/properties/union.rb', line 4

def initialize(name, types, *args)
  super(name, *args)
  @types = types
end

Instance Method Details

#typeObject



9
10
11
# File 'lib/sexy_json_schemas/properties/union.rb', line 9

def type
  @types.map(&:to_s)
end