Class: SexyJSONSchemas::Properties::Union
- Defined in:
- lib/sexy_json_schemas/properties/union.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, types, *args) ⇒ Union
constructor
A new instance of Union.
- #type ⇒ Object
Methods inherited from Base
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
#type ⇒ Object
9 10 11 |
# File 'lib/sexy_json_schemas/properties/union.rb', line 9 def type @types.map(&:to_s) end |