class Bhf::Mongoid::Document::Field

Attributes

name[R]
type[R]

Public Class Methods

new(mongoid_field) click to toggle source
# File lib/bhf/mongoid/document.rb, line 9
def initialize(mongoid_field)
  @name = mongoid_field.name
  @type = mongoid_field.type.to_s.downcase.gsub('mongoid::', '').to_sym
  @type = :primary_key if @type == :'bson::objectid'
end