lib/dbf/column/base.rb
# Underscored name
#
# This is the column name converted to underscore format.
# For example, MyColumn will be returned as my_column.
#
# @return [String]
Underscored name
This is the column name converted to underscore format.
For example, MyColumn will be returned as my_column.
Underscored name This is the column name converted to underscore format . For example MyColumn will be returned as my_column .
def underscored_name
        @underscored_name ||= begin
          name.gsub(/::/, '/').
            gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
            gsub(/([a-z\d])([A-Z])/,'\1_\2').
            tr('-', '_').
            downcase
        end
      end
def underscored_name @underscored_name ||= begin name . gsub ( / :: / , '/' ) . gsub ( / ([A-Z]+)([A-Z][a-z]) / , '\1_\2' ) . gsub ( / ([a-z \d ])([A-Z]) / , '\1_\2' ) . tr ( '-' , '_' ) . downcase end end
Underscored name
This is the column name converted to underscore format.
Underscored name This is the column name converted to underscore format .
None
String