Class: Apress::Documentation::Swagger::Schema

Inherits:
Object
  • Object
show all
Includes:
Extensions, Swagger::Blocks
Defined in:
lib/apress/documentation/swagger/schema.rb

Defined Under Namespace

Modules: Extensions

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Extensions

#swagger_path, #swagger_schema

Class Attribute Details

.document_slugObject

Returns the value of attribute document_slug.



8
9
10
# File 'lib/apress/documentation/swagger/schema.rb', line 8

def document_slug
  @document_slug
end

.resourceObject

Returns the value of attribute resource.



8
9
10
# File 'lib/apress/documentation/swagger/schema.rb', line 8

def resource
  @resource
end

.schema_blockObject

Returns the value of attribute schema_block.



8
9
10
# File 'lib/apress/documentation/swagger/schema.rb', line 8

def schema_block
  @schema_block
end

Class Method Details

.inherited(child) ⇒ Object



19
20
21
# File 'lib/apress/documentation/swagger/schema.rb', line 19

def self.inherited(child)
  swagger_classes << child
end

.schema_name(name) ⇒ Object



11
12
13
# File 'lib/apress/documentation/swagger/schema.rb', line 11

def self.schema_name(name)
  "#{self.name}::#{name.to_s.camelize}".to_sym
end

.swagger_classesObject



15
16
17
# File 'lib/apress/documentation/swagger/schema.rb', line 15

def self.swagger_classes
  @swagger_classes ||= []
end