Class: SexyJSONSchemas::Properties::AnonymousObject
- Defined in:
- lib/sexy_json_schemas/properties/anonymous_object.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize ⇒ AnonymousObject
constructor
A new instance of AnonymousObject.
Methods inherited from Object
#any_property, #array_property, #boolean_property, #integer_property, #null_property, #number_property, #object_property, #properties, property_methods, #ref_property, #string_property, #type, #union_property
Methods inherited from Base
Constructor Details
#initialize ⇒ AnonymousObject
Returns a new instance of AnonymousObject.
4 5 6 |
# File 'lib/sexy_json_schemas/properties/anonymous_object.rb', line 4 def initialize super(nil) end |
Instance Method Details
#as_json ⇒ Object
8 9 10 11 12 |
# File 'lib/sexy_json_schemas/properties/anonymous_object.rb', line 8 def as_json @properties.inject({}) do |acc, property| acc.merge(property.as_json) end end |