Class: MysqlMaxValue

Inherits:
Object
  • Object
show all
Defined in:
lib/mysql_max_value.rb

Constant Summary collapse

VERSION =
"1.0.0"
TYPES =
{
 bigint_unsigned: 0,
 int_unsigned: 32,
 mediumint_unsigned: 40,
 smallint_unsigned: 48,
 tinyint_unsigned: 56,
 bigint_signed: 1,
 int_signed: 33,
 mediumint_signed: 41,
 smallint_signed: 49,
 tinyint_signed: 57
}

Class Method Summary collapse

Class Method Details

.method_missing(name) ⇒ Object



22
23
24
25
26
# File 'lib/mysql_max_value.rb', line 22

def method_missing(name)
  if TYPES.keys.include? name
    class_variable_get("@@#{name}".to_sym) || class_variable_set("@@#{name}".to_sym, max_value(TYPES[name]))
  end
end