Class: YARD::Handlers::Ruby::ActiveRecord2::Fields::CreateTableHandler

Inherits:
MethodHandler
  • Object
show all
Defined in:
lib/yard-activerecord2/fields/create_table_handler.rb

Instance Method Summary collapse

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/yard-activerecord2/fields/create_table_handler.rb', line 8

def process
  return unless globals.ar_schema
  globals.klass = ActiveSupport::Inflector.singularize call_params.first.camelize
  if P(globals.klass).class == YARD::CodeObjects::Proxy
    # Try module with the first part
    globals.klass = globals.klass.underscore.split('_',2).map(&:camelize).join('::')
  end
  parse_block(statement.last.last)
  globals.klass = nil
end