class SwaggerDocsGenerator::Model

Parser models

Attributes

name[R]

Public Class Methods

new(controller) click to toggle source
# File lib/swagger_docs_generator/parser/model.rb, line 8
def initialize(controller)
  @name = controller.controller_name.singularize.camelize
  @orm = if defined?(Mongoid)
           ModelMongo.new(name)
         else
           ModelActiveRecord.new(name)
         end
end

Public Instance Methods

attribute_properties() click to toggle source
# File lib/swagger_docs_generator/parser/model.rb, line 17
def attribute_properties
  @orm.attribute_properties
end