Class: Swarker::Definition
- Inherits:
-
Object
- Object
- Swarker::Definition
- Defined in:
- lib/swarker/definition.rb
Constant Summary collapse
- REQUIRED_FIELD =
'required'.freeze
- PROPERTIES_FIELD =
'properties'.freeze
- REF =
'$ref'.freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(name, original_schema) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(name, original_schema) ⇒ Definition
Returns a new instance of Definition.
9 10 11 12 13 14 |
# File 'lib/swarker/definition.rb', line 9 def initialize(name, original_schema) @name = name @original_schema = original_schema move_required_fields fix_refs end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/swarker/definition.rb', line 3 def name @name end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
3 4 5 |
# File 'lib/swarker/definition.rb', line 3 def schema @schema end |