Class: Swaggable::AttributeDefinition

Inherits:
Object
  • Object
show all
Includes:
DefinitionBase
Defined in:
lib/swaggable/attribute_definition.rb

Instance Method Summary collapse

Methods included from DefinitionBase

included, #initialize

Instance Method Details

#json_formatObject



28
29
30
# File 'lib/swaggable/attribute_definition.rb', line 28

def json_format
  json_format_hash.fetch(type)
end

#json_typeObject



24
25
26
# File 'lib/swaggable/attribute_definition.rb', line 24

def json_type
  json_type_hash.fetch(type)
end

#optional?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/swaggable/attribute_definition.rb', line 36

def optional?
  !required
end

#required?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/swaggable/attribute_definition.rb', line 32

def required?
  !!required
end